add belongs_to check

Bug 1081943

The belongs_to check was lost as part of the v3 API work.
It looks like it was broken to begin with.  Fixed

Change-Id: I4e40758fa9136b76b515100b461a36d6c31b578e
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 "add belongs_to check"
Merge "Improve tests for api protection and filtering"