Clean up codebase

Let's start making https://codeclimate.com/github/remotestorage/remotestorage.js/code look better.

Also, from now on, please keep log statements, questions, commented code, duplicate functions, and other such things out of master!