3.x test

I fixed some unit tests and coding style issues, removed some old files. To get the all unit tests pass, a merge of PR browscap/browscap#524 is required.