Sync with webodf 0.4.2-1991-gd00d29e

Fixes 
https://github.com/owncloud/documents/issues/43
https://github.com/owncloud/documents/issues/174

needs to be tested with
https://github.com/owncloud/documents/issues/77
and more...