Bugfix: Fix for_window moving of assigned windows (Thanks bafain)

fixes #909
Merge branch 'fix-assign-and-move'
Bugfix: fix IPC messages writes with low buffer sizes (Thanks jasper, dcoppa)

Use the following command to reproduce this bug:

    echo 4096 | sudo tee /proc/sys/net/core/wmem_default

Then just switch workspaces with some windows on it and i3bar would
exit due to malformed IPC messages.

This bug hits OpenBSD users (and possibly other BSDs) due to their lower
default buffer size.

fixes #896
Merge branch 'fix-ipc-write'