Access origin

This will also refactor the plugin related tasks to its own class.
Also, it fixes a bug when parsing the minor version header.
i'm not sure we real need the isNull() and isEmpty() -- can't we just ``$this->getPluginInfo('allow_origin')``?