Minor changes related to CI_User_agent

Fixed a bug where both accept_charset() and accept_lang() improperly parsed headers
if they contained spaces between data separators (which is valid).

Also made is_referral() testable by replacing its static cache var with a class
property and added some more unit tests for the library as a whole.