Permission: keep a space if the permission is empty

To distinguish no permission present to nothing is allowed.
That was the intention of the old code but it did not work as
the first if was always taken
cmake compilation flags:  don't define -Wdeclaration-after-statement

We are in 2014, let me use C99 already.
csync_update: update the permission in the db when they change

The current code only update the permissions in the DB when
the permission becomes non-empty.
Now we update the permission each time they change.

That way the code is the same for file id and permission so it is
simpler.