David Cameron has described Nigeria and Afghanistan as "fantastically corrupt" in a conversation with the Queen.