Make BadgeHandler.get_option() always return integers 0 or 1

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'.