4859: rbtools should store user file in XDG directories


What version are you running?

1.0.2 alpha 0 (dev)
(Actually, I'm just looking at the docs and code, not running it.)

Describe the enhancement and the motivation for it.

According to https://www.reviewboard.org/docs/rbtools/1.0/rbt/configuration/users/#rbtools-user-config, there are at least 4 files stored in these locations:
.reviewboardrc in the home directory
cookies in ~/.rbtools-cookies or ~/.post-review-cookies.txt
* a cache in ~/.cache/.rbtools/apicache.db

The XDG base directory specification specifies standard directories for user-related files like these. This provides some consistency and reduces hidden file clutter.

The above files could potentially be moved in the following manner:
Config in ~/.config/rbtools/reviewboardrc
Cookies in ~/.config/rbtools/cookies (or possibly ~/.cache depending how you feel about it)
* Cache in ~/.cache/rbtools/apicache.db (the originally-hidden directory is a strange thing to do there.)

Though note these are defaults; for full compliance with the spec, those directories can be overridden by XDG_* environment variables.

Please provide any additional information below.

For Python, appdirs provides a complete implementation of both XDG and standard directories for other operating systems.