[web] add database module to worker
Summary: Adding logic to use .wasm module on web.
Test Plan: Check if result is properly logged from web in prod/dev and desktop.
Reviewers: jon, michal, tomek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8394