Merge branch 'release/4.0.1' into develop
Added HHVM build to travis config.
Tightened up interfaces.

- Added more formal interfaces.
- Refactored some logic into common base classes.
- Stricter visibility for class members.
- Added new getter methods where necessary.
Minor repo maintenance.
Naming convention for boolean parameters.
Added missing documentation.
Updated documentation example.
Updated changelog, readme.
Merge branch 'release/4.1.0'