Improve tests for api protection and filtering

Fills out some more tests for both these areas.  To make it easier for
any v3 tests to do their own authentication, moved the auth builder
utility functions from test_v3_auth into test_v3.RestfulTestCase.

Also fixed an issue that meant the api filtering on a boolean
would not work.

Fixes Bug #1132080
Fixes Bug #1132372

Change-Id: I7bb7b5ba61adfc6a9c496a5547a0ca3fcfbab209
Merge "Improve tests for api protection and filtering"