French President Francois Hollande says that Britain's vote to leave the EU is a "grave test for Europe" in view of the economic and financial consequences.