Refactor handle_common_error/3 to remove case statement

I found it quite odd that the first argument of `riak_kv_wm_object:handle_common_error/3` and `riak_kv_wm_counter:handle_common_error/3` had a case statement immediately, so I refactored it to use erlang's function argument pattern matching.

It also becomes very clear that there is: 
a) lots of duplication between these two functions (in different modules sadly)
b) lots of duplication between the clauses
c) slight changes between the error handling (ie some set Content-type to "text/plain", others don't)

I could do further refactoring, but I just wanted to start with a simple and obvious change first.