Add support for different categories to get_app_dir

This will improve support of the [XDG Base Directory Specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html), including the proposed [STATE directory](https://wiki.debian.org/XDGBaseDirectorySpecification#state).  Since the default for **category** is CONFIG, the default behavior of get_app_dir is still the same.  However, users can override the category to get a different type of directory.

Examples:
```
>>> APP_NAME = 'foo'
>>> get_app_dir(APP_NAME)
'/home/carl/.config/foo'
>>> get_app_dir(APP_NAME, category='CONFIG')
'/home/carl/.config/foo'
>>> get_app_dir(APP_NAME, category='CACHE')
'/home/carl/.cache/foo'
>>> get_app_dir(APP_NAME, category='DATA')
'/home/carl/.local/share/foo'
>>> get_app_dir(APP_NAME, category='STATE')
'/home/carl/.local/state/foo'
```