Better use of APC

These commits are about increasing page speed. If APC is installed then the config values are stored there so that the config values don't need to be fetched via database queries. The cache time is limited to 10 minutes by now. In the future I will test if a higher value could be a problem.

The other commits were mainly for another issue concerning the problem that sometimes the hostname isn't detected correctly. I had removed that part while searching for a problem and haven't redone it yet.

Another performance thing: Pictures are now interlaced. This should speed up things as well.