Fix EZP-22749: wrong working directory

> Fixes https://jira.ez.no/browse/EZP-22749
> Status: read for review

### Actual bug
The issue affects all shutdown handlers on apache. As said on the [`register_shutdown_function()`](http://fr2.php.net/manual/en/function.register-shutdown-function.php) doc:

> Working directory of the script can change inside the shutdown function under some web servers, e.g. Apache.

In my case, with apache, the working directory is set to "/". Some shutdown functions don't care as they don't rely on the filesystem, but others do, like eZExpiryHandler, that may write the updated expiry handler cache to FS upon shutdown.

### Fix
This patch only fixes the `eZExpiryHandler` case.

`eZExpiryHandler::registerShutdownFunction()` isn't used anymore, and Expiry cache is explicitly stored after the kernel is done excuting, be it through runCallback, run or pure legacy mode.

### BC
This deprecates registerShutdownFunction(). It should not be used at all, and must be changed to have no effect.