fix small memory leaks in the function do_send_photo for the cases of invalid, empty or large file
add functions tstrndup (auto check return value of strndup calls)
don't output backtrace in out of memory case
fix #include "config.h" for all source files
remove useless #define _GNU_SOURCE from not using asprintf sources
fix some autoscan warnings
Merge pull request #37 from antma/master

checks strndup result & enhance configure.ac