[BUGFIX] Made PHP 5.4-ready

Made the package ready for PHP 5.4 with mostly
removing "runtime pass-by references" (`&$this`).

Besides, some code is slightly cleaned up and
errors are thrown if the environment does not
match the prerequisites.
Merge pull request #8 from afoeder/master

  [BUGFIX] Make PHP 5.4-ready