Feature basic auth

Re-factor the authentication mechanism for Ajax requests to the back-end server.

1. Move the setting of Basic authentication credentials from endpoints.js to ajax.js
2. Rename the credential variables to names that are not specific to marketplace
3. Do not set the Authorization header unless the credentials are present
4. Do not set the Authorization header unless the URL is an HTTPS endpoint, since Eve can easily attack Bob and Alice's communication when they use Basic authentication in a clear-text session.