Revise plugin loading system

This commit splits up the plugin loading system into several classes to
make additional plugin loading methods easier and cleaner to write.