Created a context manager that can understand filenames, URLs, file objects, and can deal on-the-fly with gzip and bzip2 compression.
Fixed order of type checking to avoid TypeError
Follow on to #425.

This integrates `astropy.io.vo` to use the new function.

It fixes the following issues with the new function:

   - Python 3 compatibility

   - Adds a "binary" flag to determine whether the resulting file object should return bytes

   - Doesn't close file descriptors that were passed in
Moved astropy.config.data to astropy.utils.data
Started tidying up code in utils.data
Fix failing tests
Fixed imports
Added back fixed to urllib for context manager
Updated get_data -> get_pkg_data and fixed failing tests
Added tests for reading from compressed files
Make ``get_pkg_data_fileobjs`` use ``get_pkg_data_fileobj`` to benefit from compressed file support.
Test fake compressed files, and add missing file for original decompression tests.
Add an encoding kwarg to the suite of file opening functions.  This allows the user to select whether they want bytes or strings back from the file object.
Add a test for reading from an input stream (i.e. a file object without seek).  Use BytesIO instead of StringIO to be Python 3 compatible.
Renamed get_fileobj to get_readable_fileobj
Ensure that file is rewinded after creating a FileIO object as (at least on MacOS X) it sometimes ends up not being at the start.
Attempt to fix is_url for Windows
Remove overriding of __enter__ and __exit__, and make sure fileobj_new is closed if not used.
Fix handling of close_fds
"Fix" bz2 handling by decoding to a temporary file so that the decoding doesn't have to happen outside of this function.