First batch of file transfer implementation

WARNING: Incoming file transfer requests are automatically accepted and
saved to '~/neuland-download-<file name>' for now. There are no safety
checks whether a file with the same name already exists; if such a file
exists, the new content will simply be appended, and the file will be
garbage.

Outgoing transfers can be added by clicking the 'attachment' button in
the chat window's header bar. There isn't any feedback about the
transfer's progress yet (except some messages to stdout).

Not yet implemented:
* Pausing, killing and resuming of transfers
* UI for transfers
tox: Some work on file transfer

* Kill the file transfer if tox_file_send_data() fails
  MAX_SEND_DATA_ATTEMPTS (currently defined as 100) times.

* Always add the idle function
  neuland_tox_leaving_send_file_transfer_idle to the main loop when
  leaving the file sending thread.

* Ref the file_transfer before starting the file transfer thread and
  unref it in the idle function when leaving the thread, to ensure the
  file transfer stays alive as long as the file transfer thread is
  running.
file transfer: Use "transferred-size" property

When transferring a file, set the "transferred-size" property of the
file transfer every thousandth part of the total file size. The
neuland_tox_leaving_send_file_transfer_idle function became more
versatile to handle this as well, and thus has been renamed to
neuland_tox_update_file_transfer_idle().
file transfer: Improve info string
file transfer: Some minor code improvements
tox: Improve debug message for file control data

Add "Incoming" to the info, to make clear it is an incoming control
package.
file transfer: Comment out some debug messages

These caused too much noise.
file transfer: Improve error handling

When we fail to write to the local file for an incoming transfer log
warnings and kill the transfer.
file transfer: Differentiate killed state

Keep track of who killed the file transfer. We must react differently in
on_file_transfer_state_changed_cb for each case.
tox: Comment a function
tox: Don't forget to destroy file transfers

We also need to destroy all file transfers when disposing a NeulandTox
instance.
file transfer: Fix some memory leaks
file transfer: Remove unneeded line

We already set the state at the end of the function in case an error
occurred.
file transfer: Harmonize functions

Harmonize and improve code and error handling in _append_data() and
_get_next_data().
file transfer: Change type of priv member

Make priv->input_stream and priv->output_stream types consistent.
file transfer: transferred-size property changes

Remove the _set_ function and replace it by an _add_ function, and put
the calculations whether to notify about the property change there. We
currently notify on every 1000th part of the file that has been
transmitted. Now we consistently print debug messages for the progress
of incoming and outgoing file transfers.
file transfer: Add UI , improve internals

We now show a transfer widget for each transfer at the top of the chat
widget. Transfers can be paused/resumed/killed using the control buttons
in this widget.
Merge branch 'file-transfer'