fixed #181, switched to https in most points

Unfortunately the fix involves copying more files from the invenio code base to our repo. We should switch to a branch-based modification of original invenio code.