layout restoring: append at the nearest split container (or workspace) (Thanks chris)

Before this commit, leaf containers (such as terminal emulators) would
get children appended, which is not intended.

fixes #1223
Don’t overwrite existing windows with placeholder windows

This could happen when you appended a layout on a workspace where there
are already other windows.
respect CFLAGS in linking command

fixes #1233
fix parallel make

fixes #1232
build i3-save-tree(1) manpage (Thanks xeen)
Fix i3.mk to not rebuild test.* all the time

This problem was introduced in 5181055a
add docs/layout-saving

Feedback on this new document is very much appreciated, please don’t
hesitate to state anything that is hard to understand/could be improved.
Reset SIGIPE handler before executing a command

This commit:

commit fb6d117c42ce3d9988ff44c079814b3840b1e37f
Author: Axel Wagner <mail@merovius.de>
Date:   Thu Dec 30 21:09:32 2010 +0100

    Port sighandler to tree-branch

blocks SIGPIPE. Unfortunatelly blocked signal set is preserved accross
execve()s, so any program executed by i3 inherited blocked SIGPIPE signal.
This leads to courious effects when pipe writer does not terminate after
exiting pipe reader.

Simple reproducer is to spawn a new xterm by a key shortcut and then run this
command there:

$ perl -e 'print $SIG{PIPE}, qq{\n}'
IGNORE

fixes #1237
Bugfix: resize window check should check for null

When checking the window type for a resize command, first check to see
if the window property is null before checking whether or not it is a
dock window. The window may be null in the case it is a branch
container.

fixes #1220
Move check_for_duplicate_bindings to bindings.[ch]

Additionally add a check for the same input_type (mouse or keyboard).
Bindings with different input types cannot be duplicates.
debian: add docs/layout-saving
add missing docs/layout-saving-1.png
i3-dmenu-desktop: also quote the %c field code (Thanks bo)

The spec says:

“Implementations must take care not to expand field codes into multiple
 arguments unless explicitly instructed by this specification. This means
 that name fields, filenames and other replacements that can contain
 spaces must be passed as a single argument to the executable program
 after expansion.”

fixes #1240
libi3: add logical_px() for Retina display support
Initialize default window border width retina-correctly
i3bar: render separators retina-correctly
draw workspace buttons and padded text blocks retina-correctly
do click handling and tray padding retina-correctly
truncate DPI to an integer before multiplying (Thanks eeemsi)

This fixes i3bar workspace button rendering on non-DPI screens
(oldschool!)
Implement bindsym mouse configuration

If a `bindsym` config directive specifies a symbol beginning with
"button", the binding will be given the type B_MOUSE for the indicated
button number.

Example:

bindsym $mod+button2 exec echo 'button two'

This will be interpreted as having input code (now `keycode`) 2 and type
B_MOUSE.

The mechanism to find and run mouse bindings on mouse events is not
implemented.