Support replacing dataset file with API

``DataSetResource`` didn't support the ``put_detail`` method,
causing the replacement of dataset files to fail.

This commit implements file uploads just like ``AssetResource``.
In fact, both ``Resource`` classes now inherit from a common
base class that makes ``post_detail`` emulate ``put_detail``
if a ``iframe`` query parameter is present. Otherwise, this the
method is disallowed.

In order to write unit tests for this new functionality, I had to
add some utility methods to ``DataSetResourceTest`` and make a new
``create_local_dataset`` function.

Closes #829