Scots All Saints College headmaster David Gates to finish in June