pkgdb2client: Cleanup on-demand login code

- Rename login_retries to login_attempts
- Allow to set login_attempts in constructor
- Add docstring for login_callback()
- Fix typo in exception
Merge pull request #12 from tyll/simplify

pkgdb2client: Cleanup on-demand login code
pkgdb2_cli: Ask for password only if required

Use login_callback to ask for username/password only when it is
required.
PkgDB: Store cookies

Store cookies in pickle file if possible.
Merge pull request #13 from tyll/cli

pkgdb2_cli: Ask for password only if required
pkgdb2client: fix indentation
Merge pull request #14 from tyll/simplify

pkgdb2client: fix indentation
Merge pull request #9 from tyll/store_cookies

PkgDB: store cookies