Reorganize server files and address TODO comments

Changes:
- Remove unneeded dependencies from package.json
- Remove unneeded async build() methods from services
    - Use constructor as often as possible
- Rename and move storage services for clarity
    - creds.ts -> accounts.ts, and creds.json -> accounts.json
    - admin-config.ts -> admin-account.ts
    - vault.ts -> signing-keys.ts
- Rename ws.ts to websocket-server.ts for clarity and consistency
- Make WebSocketServer initialize using constructor and bind server upgrade to WebSocketServer.upgrade
- Remove unused send-account-message endpoint from account-router.ts
- Set issuer and audience claims for JWT
- Create new utils/jwt.ts file to remove code duplication for JWT signing and verifying
- Delete utils.ts and merge it with jami-swig.ts
- Handle potentially undefined types in jami-swig.ts
- Replace hard to read one-liners with functions in jami-swig.ts
- Rename types in jami-swig.ts for consistency with daemon
- Remove handled/answered TODO comments
- Remove TODO comment about using .env for jamid.node as it does not work for require()

GitLab: #87
Change-Id: I1e5216ffa79ea34dd7e9b61540fb7e37d1f66c9f
diff --git a/client/src/contexts/WebSocketProvider.tsx b/client/src/contexts/WebSocketProvider.tsx
index 38317e2..e6e246b 100644
--- a/client/src/contexts/WebSocketProvider.tsx
+++ b/client/src/contexts/WebSocketProvider.tsx
@@ -77,17 +77,21 @@
       setTimeout(connect, 1000);
     };
 
-    webSocket.onmessage = <T extends WebSocketMessageType>({ data }: MessageEvent<string>) => {
-      console.debug('WebSocket received message', data);
-      const message: WebSocketMessage<T> = JSON.parse(data);
+    webSocket.onmessage = <T extends WebSocketMessageType>(event: MessageEvent<string>) => {
+      const messageString = event.data;
+      console.debug('WebSocket received message', messageString);
+
+      const message: WebSocketMessage<T> = JSON.parse(messageString);
       if (!message.type || !message.data) {
-        console.warn(`Incorrect format (require type and data) ${message}`);
+        console.warn('WebSocket message is not a valid WebSocketMessage (missing type or data fields)');
         return;
       }
+
       if (!Object.values(WebSocketMessageType).includes(message.type)) {
-        console.warn(`Unhandled message of type: ${message.type}`);
+        console.warn(`Invalid WebSocket message type: ${message.type}`);
         return;
       }
+
       const callbacks = callbacksRef.current[message.type];
       for (const callback of callbacks) {
         callback(message.data);