Fix a couple of selection issues

* In FireFox if an image has no text around it, click on either side of the image resulting the same selection get returned. focusNode: image, focusOffset: 0. To workaround it, move the cursor to the next walkable position when clicking on the right side of an image.

* Another corner case is that when click on the right side of an image that has no text elements, non-FireFox browsers will retrn focusNode: frame, focusOffset: 1 as the selection. Since this is not a valid cursor position, move the cursor to the next walkable position after the frame node.
Merge pull request #294 from kevinlli/selectionFix

Fix a couple of selection issues
Allow selection of empty lists by making editinfo elements inline blocks

Elements that are simply display:inline, but have no visible content can
do strange things to the browser selections in Chrome. They will actually
stop other preceding nodes in the same container from being selectable,
instead causing the selection to climb to the parent container.

Fixes issue #30
Merge pull request #374 from peitschie/empty-list-chrome

Allow selection of empty lists by making editinfo elements inline blocks
Add support for asynchronous loading of classes.

Dependencies between classes are listed in the manifest.json files.
These files list what classes are required to load other classes. Yet, each eval
of a class can trigger loading of a required class. This means that the request
for a particular class is only sent out when the class that needs it is loaded.

This patch adds a new function:
    runtime.loadClasses(classNames, callback);

This function creates a list of all required classes before doing any loading.
If the environment is the browser and a callback is provided, the list of files
is added as <script/> tags to the DOM. This means the browser can request all
files at once. The callback is attached to the onload trigger of the last
<script/> tag.

If no callback is provided, the files are still loaded synchronously.

runtime.loadClass is still present but redundant, since the runtime already
knows what classes are needed for other classes.

odf.html is adapted to use the new class.
Remove loadClass calls from class files. The load system reads the dependencies from the manifest.json files now.
Add comments and better browser detection.
Use clearer names for the functions that load the dependencies.