Add database function on browser init instead of startup.

The database may be closed/reopened (e.g., sync) while Anki is running, so we need to ensure the function is always available when the browser opens. There is no consequence to repeatedly adding the same function (the previous one is overridden).