Delayed writes

This is the pull request related to https://bugs.freenetproject.org/view.php?id=5471