US president makes jokes, mocks opponents at correspondents' dinner that was halted by a shooting in April.