Fixed #12756: Improved error message when yaml module is missing.

Running dumpdata without `pyyaml` installed will now produce a useful error message:

```
[berto@scratch]$ python manage.py dumpdata --format=yaml
CommandError: Unable to serialize database: No module named yaml
```