Remove non-null assertion in ConversationProvider

- Add `createOptionalContext` that is used by `AuthContext` and `ConversationContext` to create a context with a hook
  that can be used to retrieve its value and throw an error if it's undefined.
- In `router.tsx`, put `Messenger` inside `ConversationProvider`.
- In `ConversationListItem`, use the conversationId from the `ConversationContext ` instead of the url params.
- Fix bug in `CallInterface` with fullscreen.
- Remove unecessary useEffect dependency in `NotificationManager`.

Change-Id: Ib5f0ae6a0a34cdbdb02f871e36194376d945230d
diff --git a/client/src/pages/CallInterface.tsx b/client/src/pages/CallInterface.tsx
index 54c9b10..f21c49c 100644
--- a/client/src/pages/CallInterface.tsx
+++ b/client/src/pages/CallInterface.tsx
@@ -47,7 +47,7 @@
 } from '../components/CallButtons';
 import CallChatDrawer from '../components/CallChatDrawer';
 import { CallContext, CallStatus } from '../contexts/CallProvider';
-import { ConversationContext } from '../contexts/ConversationProvider';
+import { useConversationContext } from '../contexts/ConversationProvider';
 import { WebRtcContext } from '../contexts/WebRtcProvider';
 import { VideoElementWithSinkId } from '../utils/utils';
 import { CallPending } from './CallPending';
@@ -63,7 +63,7 @@
 
     if (isFullscreen && document.fullscreenElement === null) {
       callInterfaceRef.current.requestFullscreen();
-    } else if (!isFullscreen && document.fullscreenEnabled !== null) {
+    } else if (!isFullscreen && document.fullscreenElement !== null) {
       document.exitFullscreen();
     }
   }, [isFullscreen]);
@@ -187,7 +187,7 @@
 
 const CallInterfaceInformation = () => {
   const { callStartTime } = useContext(CallContext);
-  const { conversation } = useContext(ConversationContext);
+  const { conversation } = useConversationContext();
   const [elapsedTime, setElapsedTime] = useState(0);
   const memberName = useMemo(() => conversation.getFirstMember().contact.getRegisteredName(), [conversation]);