fixed places where we should return NGX_ERROR instead of NGX_HTTP_INTERNAL_SERVER_ERROR; also fixed a clang warning.
added test cases for the recent fixes in the Cookie request header handling.