Parse user agents correctly [MJ-751]

There are fields after the user agent in redirect logs that were being appended to the user agent. This was causing everyone to be detected as a bot (server name my.jobs, uas containing 'jobs' are thought to be bots).

Updating the ua construction code seems to fix the issue.

Also only retrieves users if myguid has a value. Should drastically reduce db hits.

All tests pass.