[api] add some caching for very hot routes

The caching of visibility of packages is tricky, I tried to be as careful
as feasible
[api] be easier on the mysql query optimizer

(a.target_project='openSUSE:Factory' OR 0) is the same as without OR
to the human eye, but it invalidates the use of indeces (sometimes?)

It makes the difference between 6273.2ms and 12.3ms, so it's worth it
[backend] obs_admin --clone-repository: do not link :repoinfo

Thanks UkJung Kim for finding this bug.
[backend] implement small lastfailure database in the reposerver

This is done to speed up coolo's project status page.
[dist] show the codeclimate note (as long as it's green :)
[api] avoid deprecation warning in log file
[api] don't block /lastevents and /public/lastevent

Map public/lastevents and lastevents to the same function and map it
to a GET, which can be X-Forwarded
[api] fix typo - my fingers are sticky from sweat
[api] add an index for messages

We very often dig out the last 5, which asks for an index
[api] fix passing requests to backend

unfortunately I can't use standard rails methods as backend relies on
repeated parameters, e.g. interconnect can have multiple filters, while
rails parameter parser only has the last one
[api] reuse valid_project_name to unpanic reviewers
[api] require the helper for scripts
[api] one more try to fix project validation

I can't reproduce the problem jenkins sees myself ;(
[api] get rid of code duplication

There is no point in having 2 places to valid package and project names
(that even work differently) - leave alone the fact that the backend and
the webui have similiar code ;(
[api] read download_url and ymp_url from configuration
[webui] update_live_log is ajax only
[api] migrate more configs into database

(no suprise we didn't see any exceptions on errbit)
[api] remove duplicated test and fix one (invalids are 400 and not 404)
[api] fix a bootstrap issue

(that again only jenkins could find ;(
[api] debugging jenkins problems with random commits ;(