Add an authentication filter to check if the user is an admin.
Currently there are only two roles: admin and user. Admin has the permission to some special REST APIs, for example. shutdown.
An HTTP request may contain a basic authentication header with the username and password provided. Any user that is not recognized as an admin will be treated as an ordinary user.
Get the admin password from catalog.
Catalog has it if the password is specified in the deployment.cfg.
Use RolesAllowed.
Also add an API to get the path to the deployment file, restricted to admin only. This is reserved for the watchdog.
Change the shutdown test to check the password.
Return 401 when the user says it's admin with an incorrect password.
Change test to test it.
MasterResource: return a message on successful shutdown

Fix #636
MasterDaemonTest: fix for change to shutdown response content
fixes
remove unused sc
refactor authentication
change enum values of FTMODE and ROLE to uppercase
merge from master
fix tests
remove unnecessary valueOf()
add prefix column, use it in TB, and implement limit
test limit
Limit: add encoding
change QueryStatusEncoding.ftMode to enum
To initiate basic auth, the server should respond with a 401 Not Authorized, not a 403 Forbidden (see https://en.wikipedia.org/wiki/Basic_access_authentication)
upgrade to gradle 2.2.1