SERVER-14561 Make getStatusFromCommandResult a free function supplied by mongo/db/common.

It was formerly a static member function on the Command class, which made it hard to link
into unit-testable code.