The US President had been giving a speech on gun control to a packed crowd in Connecticut before he paid tribute to the Queen