fixes undefined appitem - fixes #12396
The "dir" key is used within the public sharing template to indicate in which directory the user currently is when sharing a directory with subdirectories. This is needed by the JS scripts.

However, when not accessing a directory then "dir" was set to the relative path of the file (from the user's home directory), meaning that for every public shared file the sharee can see the path.
(For example if you share the file "foo.txt" from "finances/topsecret/" the sharee would still see the path "finances/topsecret/" from the shared HTML template)

This is not the excpected behaviour and can be considered a privacy problem, this patch addresses this by setting "dir" to an empty key.

Port of https://github.com/owncloud/core/pull/12262, approved with https://github.com/owncloud/core/pull/12262#issuecomment-64394040
Merge pull request #12415 from owncloud/port-12262

Backport #12262
Merge pull request #12397 from owncloud/fix-undefined-appitem

[stable7] fixes undefined appitem - fixes #12396
fix calculation of expiration date if there is a default expiration date set (but not forced) and the user does not want the link to expire.
Consolidate if statement, and update unit test
Don't show favicon to prevent iteration through subfolders

The codepath for generating the favicons iterates through subnodes and if one of those nodes is unavailable is throwing a 503 exception. Since these favicons don't have any use except of "making a tool for developers looking nicer" I consider it feasible to remove them.
added comment that App Store is disabled for EE
delete old previews
Add notes that SQLite is CE only
Markup corrections
Check for XMLWriter class

Backport of https://github.com/owncloud/core/pull/12321