prevent using Tomcat user when setting directories permissions

Instruction for setting up permissions for cache and log directories sometimes won't work when Tomcat server process is running.This is because APACHEUSER variable will be set to invalid value.
On my system for instance is set to tomcat6 instead of www-data.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.2+
| Fixed tickets | -