refactored the library a bit
parse global vars before segment vars, fix #8
Merge branch 'master' into develop

Conflicts:
	system/expressionengine/third_party/pre_embed/pi.pre_embed.php