(WIP) Loader - incorporate pathogen encoding logic in a separate module under loader.

This is a follow up to https://github.com/yui/yui3/pull/1813. 
I created this pull request specifically for feedback as to the direction that needs to be taken.

@caridy
@juandopazo
@ekashida
if this the method that is suppose to be override or AOP'd by custom encoders? if so, let's add the docs for that.