[Stable 7] Add extra option to disable doc(x) support

Backport of https://github.com/owncloud/documents/pull/396 to stable7