Add basic HTTP authentication to archive POST/DELETE.

The credentials can be stored in the charmd configuration file.
Abstract out the authentication logic in a decorator.
Created a card for the DoRequest refactoring.
I should stop doing reviews before enough coffee in the morning. Thank for reminding me, @rogpeppe