Added yaml test for dumpdata command.

Make sure dumpdata command raises an ImportError when the yaml module is
not available.
Added call to get_serializer.

Prior to the serialization optimization test, simply get the requested
serializer to make sure it exists.  This will allow a yaml format import
to raise an ImportError when the module is not installed.