Disabling Google Analytics didn't work

Disabling Google Analytics didn't work because the variable 'analytics'
in BadgeHandler.get() contained the string '0' when the appropriate GET
parameter was sent. Therefore, '{% if analytics %}' in the template
always evaluated to True and Google Analytics was included.
This change also introduces stricter input validation for the GET
parameters 's' and 'a'.