Refactor messageList init function

Performs the background script message passing (etc) while the page loads,
and executes the rest of the script after DOMContentLoaded event has fired.