speedup for propfinds on shared folders

A PROPFIND request still takes ~10 times longer on a shared directory than on an unshared one, but without these patches it takes about ~200 times as long. These changes seem to work for me.

Before: ~70 seconds, after: ~4 seconds. Unshared access: ~0.3 seconds. 

PHP scripts do, by default, not execute for more than 30 seconds on Ubuntu, and most likely on other distributions too. Thus, PROPFINDs taking longer than 30 seconds won't work, breaking the OC sync client. (Maybe the webinterface too.)

This is a significant improvement and people ask for it: see http://mail.kde.org/pipermail/owncloud/2013-June/009758.html, ff, and issue #2846 .

@icewind1991 @MTGap Any objections? Are additional patches needed? 

@karlitschek Please consider this for 5.0.8 (RC2?)