A major security drill has taken place in London to test the capital's response to a potential terror attack during this summer's Olympics.