Backport several changes from my Debian packaging work

* Makefile now honors CFLAGS and DESTDIR from the debhelper build system.
* modify anetWrite() to handle EAGAIN so I can send data larger than
  SO_SNDBUF if needed.
* Modify the HTTP server to use anetWrite() to prevent short writes while
  sending content.
* Modify the HTTP server and script.js to pass --lat and --lon arguments
  to the web interface via an AJAX call to config.json.
* Set the correct HTTP status code if we have problems serving a file.