Changed the code logic of bookmarklet popup.

Rewrote the addBookmark function, it should be a lot shorter and more
readable now. Moved certain calls and creation logic of entities to
standalone functions. Changed the way loading options and authentication
work. Used callbacks to only make certain calls in case the required
information was successfully loaded earlier. User will see an error if
options could not be loaded or are empty, that would have prevented the
authentication from succeeding. Authentication call is also checking if
it has been successful, displays the error message if not. Both methods
store loaded data that is needed by the other calls later on into global
variables (might not be the best solution, but should work for now).
Also added a logic for loading tags data to be used for creating a
tagcloud in future (that functionality is still not finished). The
plugin should be on at least the same level of functionality as it was
before, but the code is more readable and maintainable (still far from
being good enough). Also there is some messaging functionality that will
notify the user about some of the errors that might occur or extension
misconfiguration.