fix($http): honor application/json response header and parse json primit...

...ives

When server responds with Content-Type header set to application/json we now properly parse the response as JSON

Closes #2973