Fixed a wrong timestamp update when adding a file.

When a file was uploaded the timestamp of the containing folder
should get updated, but the timestamp of the first file in the
folder was mistakenly updated.
There are some more wrong timestamps, but still looking for the bug.
Fixed some more timestamp bugs in RedDAV.

Fixed an SQL-query in RedFile::put(), where parameters where in wrong order.
Return a correct timestamp when a folder is empty.

If a folder was empty a zero timestamp was returned. Now it will
return the timestamp of the folder itself.
Add rename support for DAV directories.

This works only over DAV right now, no GUI yet.
Merge pull request #516 from dawnbreak/master

Fixed a wrong timestamp update when adding a file.