Added support for repository/json. Data parsed from the user-agent

This is the first step to add support for arch checking when pulling. It adds 2 things:

1. The user-agent header is parsed when the "latest" tag is set.
2. A new endpoint "repository/foo/bar/json" exposes some new data about the repos.

It's different from the repos properties, those information are "static", not set afterwards. Right now only based from the user-agent but we might want to add some more data later.

I also improve some tags tests (and added the one related to these changes).