The Duke and Duchess of Cambridge made a moving visit to a Commonwealth war graves cemetery on their last engagement in Singapore.