A slightly different #810

https://github.com/irungentoo/ProjectTox-Core/pull/810

Basically the same thing, but data.h is now an optional header, and the saving glue is implemented at the Messenger layer instead of the tox layer.

Everyone should use tox_export instead of tox_save now.