Tiny cleanups in onBeforeRequest

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Optimize onBeforeSendHeaders

This function makes little sense to me. I think the logic originally was:

If we lose the race to update cookies in onHeadersReceived, we can win it now in
onBeforeSendHeaders.

Unless I'm missing something, I think this *whole function* might be completely useless.

I'll open up an issue to discuss that in a bit.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Let developers know about DEFAULT_LOG_LEVEL.

Since we are much more silent, let anyone who opens the console know that
DEFAULT_LOG_LEVEL can be adjusted to debug rules, etc.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Drop trailing comma errors that break Closure, etc.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Move redirect loop detection to prior block

No sense in testing the redirect counter right after we set it.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Fix some tiny but annoying jslint errors

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
High-severity messages accidentally logged twice

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Merge branch 'assorted-cleanups' of github.com:semenko/https-everywhere into semenko-assorted-cleanups