Allow content-type negotiation in 403 handler

(This should fix https://github.com/FriendsOfSymfony/FOSRestBundle/issues/365)

As well as checking for the _format parameter, also check to see
if the request content-type matches.

It appeared that the static $handling variable was never reset
to false at the end of the method. This caused two consecutive
calls to the handler method to fail during the tests.

Notes:

* Removed two unused use statements.
* Compacted the tests into one helper method to avoid duplicated
code.