Delete duplicated files, add comments and implementation for "magic" methods

Now can do .is?("ios") or simply .ios?
Improve how http_headers and user_agent are set, throw exception if UA not set

Add some basic tests for all methods, copied shamelessly from the php project's basictests.php file