Queen Elizabeth discussed her private views on the Brexit referendum over lunch with then-US President Barack Obama, a new book claims.