Avoid loading middleman-core unless needed (v3)

Same as the other PR, but against the v3-stable branch.