Integrate respond_to and respond_with into api controllers

Didn't want controllers to respond with JSON output to all kinds of
requests. Changed to remove default { format :json } in :api namespace,
and to only respond to :json format requests.

Format can be set using the 'Accept' HTTP header or appending .format at
the end of the URL.
Update api projects controller and spec to use respond_with

Performing JSON requests in the controller spec.