Display list of problem statements and link from page menu.

Several people reported that they spent significant time to find the
problem statements in the team interface. This should make it more
obvious to find them.
Make sure that we always default redirect to the public webinterface
and only redirect to team if the 'team' role has been set, not when
the user has the superset role 'admin'.
Add problem ID to problem list, fix spelling.
Fix tab indentation, trailing whitespace, minor code layouting.
No functional changes.
Move DOMjudge-native checking of username/password to separate function.
Put roles query into separate function
Refactor API to single endpoint and use of DOMjudge permissions system

Because we now have global users and permissions in DOMjudge, move
the api to a single endpoint www/api/, doing away with www/jury/api/.
The API will now use DOMjudge's roles to decide who may access it.
An API function can define which roles may access it; define none
to make it public; admin may access any.

Change specification of the handler from using rewrites to using
path_info. This means we can make it work with a single Alias line
in Apache and can do away with .htaccess files.

Authentication happens in one of two ways: firstly, based on an
already authenticated user. If that's not the case, the caller can
pass a username and password via HTTP Basic Auth which will be
checked against DOMjudge database (regardless of configured auth
scheme).