reorganize bootstrapping code so that it works with Composer's autoloader

see https://github.com/scribu/wp-posts-to-posts/pull/449