setup deprecation warnings.

call dnf.logging.depr() to flag a deprecated code path.

the implementation tries to obey the following:

- dnf users never see the warnings (achieved explicitly by never using
  deprecated code in DNF CLI)
- warnings are logged to dnf.log (achieved by using logging.captureWarnings)
- API clients see the warnings in stderr depending whether the WARNING logging
  level is enabled for stderr and always in the logfile (achieved by sharing the
  same handles with the 'dnf' logger)
- DNF does not disturb whatever the API clients/Python defaults have set for
  warning categories (achieved by supplying and setting up our own deprecation
  warning class)
refactor: initializing a Repo.

Since a repo always needs a cachedir, make it an argument of the constructor.

api: doc: Repo.__init__().