resource Issues from Json generation

This PR includes all resource changes which were found while creating the Json output. This also includes some SortIndex changes which were found while testing with my refactoring branch of browscap-php.

This PR should be merged before #297.