Multisite: Updated to allow different main blog than default.

The main blog in a multisite install is typically ID 1. This can be altered by
altering the database directly. This commit dynamically pulls the proper main
blog id.

Resolved #330