Disable text editor app in public mode when logged in

This fixes #5059 by disabling the text editor app from the JS code,
because it's currently not possible to detect public mode from app.php
Merge pull request #1405 from owncloud/texteditor-disableinpublicmode

Disable text editor app in public mode when logged in