Add a `.deprecate` method

Implements the functionality in https://github.com/isaacs/npm/blob/master/lib/deprecate.js as an API method.