use strdup() instead of malloc()/memcpy()
fix low-hanging fruit compilation warnings

There are still several compilation warnings that will require more
thought about how to fix them properly. Fixes:

src/connection.c: In function ‘connection_start’:
src/connection.c:27:17: error: assignment makes integer from pointer without a cast [-Werror]
  conn->start_ts = NULL; //time(NULL); not used anyway... // TODO: cache the time
                 ^
src/request.c: In function ‘request_parse’:
src/request.c:163:18: error: assignment makes pointer from integer without a cast [-Werror]
  req->method_len = method_len;
                  ^
src/config_file.c: In function ‘config_load’:
src/config_file.c:166:6: error: passing argument 1 of ‘config_save_value’ from incompatible pointer type [-Werror]
      config_save_value (&key, &value, conf, NULL);
      ^
In file included from src/config_file.c:1:0:
src/config_file.h:11:5: note: expected ‘char *’ but argument is of type ‘char (*)[512]’
 int config_save_value(char *key, char *value, config *conf, char *scope);
     ^
src/config_file.c:166:6: error: passing argument 2 of ‘config_save_value’ from incompatible pointer type [-Werror]
      config_save_value (&key, &value, conf, NULL);
      ^
In file included from src/config_file.c:1:0:
src/config_file.h:11:5: note: expected ‘char *’ but argument is of type ‘char (*)[4096]’
 int config_save_value(char *key, char *value, config *conf, char *scope);
     ^
src/config_file.c: In function ‘config_load_servers’:
src/config_file.c:264:42: error: assignment makes pointer from integer without a cast [-Werror]
         conf->proxies[conf->proxy_count] = proxy_init();
                                          ^
src/config_file.c:306:7: error: passing argument 1 of ‘config_save_value’ from incompatible pointer type [-Werror]
       config_save_value (&key, &value, conf, scope);
       ^
In file included from src/config_file.c:1:0:
src/config_file.h:11:5: note: expected ‘char *’ but argument is of type ‘char (*)[128]’
 int config_save_value(char *key, char *value, config *conf, char *scope);
     ^
src/config_file.c:306:7: error: passing argument 2 of ‘config_save_value’ from incompatible pointer type [-Werror]
       config_save_value (&key, &value, conf, scope);
       ^
In file included from src/config_file.c:1:0:
src/config_file.h:11:5: note: expected ‘char *’ but argument is of type ‘char (*)[2048]’
 int config_save_value(char *key, char *value, config *conf, char *scope);
     ^
src/mime_types.c: In function ‘mime_types_get_by_filename’:
src/mime_types.c:102:20: error: initialization from incompatible pointer type [-Werror]
  char *extension = &ext;
                    ^
src/response.c:106:23: error: assignment makes pointer from integer without a cast [-Werror]
    resp->content_type = mime_types_get_by_filename(f->filename, f->filename_len, srv->mime_types);
                       ^
src/response.c:111:23: error: assignment makes pointer from integer without a cast [-Werror]
    resp->content_type = mime_types_get(".html", 5, srv->mime_types);
                       ^
src/response.c:116:23: error: assignment makes pointer from integer without a cast [-Werror]
    resp->content_type = mime_types_get(".html", 5, srv->mime_types);
                       ^
src/response.c:121:23: error: assignment makes pointer from integer without a cast [-Werror]
    resp->content_type = mime_types_get(".html", 5, srv->mime_types);
                       ^
src/response.c:127:23: error: assignment makes pointer from integer without a cast [-Werror]
    resp->content_type = mime_types_get(".html", 5, srv->mime_types);
                       ^
src/server.c: In function ‘server_init’:
src/server.c:25:20: error: assignment makes pointer from integer without a cast [-Werror]
  srv->status_codes = status_codes_init();
                    ^
src/server.c:28:18: error: assignment makes pointer from integer without a cast [-Werror]
  srv->mime_types = mime_types_init();
                  ^
src/worker.c: In function ‘worker_init’:
src/worker.c:16:34: error: comparison of distinct pointer types lacks a cast [-Werror]
  if ((w = shmat(shmid, NULL, 0)) == (char*) -1) {
                                  ^
src/worker.c: In function ‘worker_server’:
src/worker.c:95:34: error: comparison of distinct pointer types lacks a cast [-Werror]
  if ((w = shmat(shmid, NULL, 0)) == (char*) -1) {
                                  ^
fix connection_setup return type.

Fixes:

src/connection.c: In function ‘connection_setup’:
src/connection.c:21:2: error: return from incompatible pointer type [-Werror]
  return conns;
  ^
src/worker.c:107:11: error: assignment from incompatible pointer type [-Werror]
  w->conns = connection_setup(master_srv);
           ^
fix misuse of pointers to epoll events

Change the events member of the event_handler from a double pointer to a
single pointer, and rework allocation appropriately.  This makes it
suitable for directly passing it to epoll_wait.
pass master_server to socket_listen_setup
file_item fd type is FILE *; fix users

It appears that perhaps the type of file_item::fd was change fro 'int'
to 'FILE *' at one point, but not all uses were updated appropriately.
Do so now.
fix implicit definition of tolower()
fix implicit definition of read() and write()
eliminate unused variable warnings
fix implicit definition of pthread_create
fix type of heartbeat_monitor
fix accidental usage of 'error'.  use 'perror' instead
move definition of mime_types_add to prevent implicit declaration warning
move static definition of worker_thread into worker.c
fix implicit definition of clone(2)

It is necessary to #define _GNU_SOURCE to get a proper definition of
clone(2).  Also, deal with type warning fall out from this inclusion
(adjust type of worker_server)
fix implicit definition of pthread_create
move worker thread function declarations out of the public worker.h

Declare them as static and give them the correct type.
remove unused variables rc_cleanup and rc_heartbeat
Merge pull request #4 from joshcartwright/master

more cleanups; make shortfin -Wall friendly