Local authorities can be queried through the API

LocalAuthority objects should be queryable with a specific (unique) and
searchable in the event that a name match would suffice. This commit
allows doing both.

The unique field for a LocalAuthority is the snac code, which is why
there's a direct route in the form of /local_authority/snac_code.json.
However it's also possible to do a partial search of a snac code using
the /local_authorities.json slug.

Similarly, it's possible to search for council names using the
/local_authorities.json slug. This can be done both partially or
directly.
Remove string contain check for '*' character

The lines above each of these blocks already convert the provided
parameters to only use alphanumeric values so they're redundant.

Instead use the 'unless' idiom to fail-fast if the strings are empty.

Also updated the tests so that the Regex prevention are hard tests,
rather than soft wraps which fall back to the singular character case.
Simplify blocks involving conditionals

As recommended by @jystweart, use the idioms of Ruby here. As these
blocks don't have a corresponding 'else' block, the 'unless' modifier is
easier to read.

Also remove the direct nil? check and make it implicit.
Move search_param evaluation inside 'if' block

There's no need to do this evaluation to find out the param to use if
the @local_authorities variable is either nil or empty. Do this
evaluation inside the if block.
Use the positive case for the Array empty check
Provide empty result sets for searches not 404s

As suggested by @fatbusinessman, it's kinder to return an empty result
set when a user searches.

The 404 case only shows up when no parameters are provided to the
/local_authorities.json URL.
Clean up whitespace
LocalAuthority results provide a canonical id

To conform with the rest of the API, all resources should provide a
canonical way of querying the resource directly. This has been
implemented in the form of an "id" node, similar to the Tag api
equivalent.
Refer to test as "glob", not "regex"

Appease the pedants by renaming the tests to be labelled in relation to
globs over regexes.

For more info: http://en.wikipedia.org/wiki/Glob_(programming)
Query LocalAuthority by 'name', not 'council'

All local authorities aren't councils. Querying them like this is
disingenuous. Instead, rename this query param to 'name' as the model
states.
Update route to follow rails route convention

Rather than filling up the URL routes with both /local_authority/ and
/local_authorities.json it's better to use a single main root. In this
case, defaulting to /local_authorities/
Don't refer to council any longer
Use Regexp.escape instead of a hand-rolled regex filter

While the original Regex filter worked it didn't explain much to anyone
what it was doing and the tests only made sure that the result set was
empty.

Add an expectation to the model to check that it's called with the
escaped parameters.
Remove explicit assert_status_field definition

This method is mixed into the GovUkContentApiTest object so there's no
need to explicitly define it.
Merge pull request #11 from alphagov/local_authority

Local authorities can be queried through the API
Fix the test failures caused by merging PR #11

This pull request was incompatible with master.
https://github.com/alphagov/govuk_content_api/pull/11
Makes tests compatible and removes references to
base_api_url.