Change prototype for custom_packet_handler functions

Change the custom_packet_handler callback function interface to be
consistent with other callback interfaces.

The new interface takes the Messenger object calling as the first
parameter, and moves the user data object to be the last parameter. 

This makes it comparable to the callbacks for file transfer and the
like, and should simplify building interfaces.

The new prototype is: int (*)(Messenger *m, int32_t friendnumber, const
uint8_t *data, uint32_t len, void *object)
Patch auto_tests/tox_test.c with the new prototype
Merge branch 'more_consistent_custom_packet_handlers' of https://github.com/wrouesnel/toxcore
Fixed tox_test.c