Cleans up directory structure

- Moves each module into own directory
- Moves all examples into example directory ( to be run from root dir )
- Changes minor dependency structures to support new tree
- Changes WebSocket type id from Int32 to Int for Endian agnostism
Cleans up code and adds default response data

- remove trailing whitespace
- default response data for status-only Response(Int) and Response(Int, String)
- various syntax changes for clarity
Adds Httplib and decouples Websockets, Http, et al

- Changes the request and client handling API to use new functions
  `handle` and `is_websocket_handshake` that dispatch on the handler.
- Http exposes a WebsocketInterface abstract type with default
  implementations of these functions that throw errors.
- Websockets implements these for a WebsocketHandler, which it defines.
- In addition, generic stuff like Request, Response, Headers, et al.
  have been moved to an Httplib module.
Cleans up code and adds default response data

- remove trailing whitespace
- default response data for status-only Response(Int) and Response(Int, String)
- various syntax changes for clarity
Adds Httplib and decouples Websockets, Http, et al

- Changes the request and client handling API to use new functions
  `handle` and `is_websocket_handshake` that dispatch on the handler.
- Http exposes a WebsocketInterface abstract type with default
  implementations of these functions that throw errors.
- Websockets implements these for a WebsocketHandler, which it defines.
- In addition, generic stuff like Request, Response, Headers, et al.
  have been moved to an Httplib module.
Adds documentation and slight refactoring to Http

- Moves GC method `clean!` from callback to below blocking loop in `process_client`
- Adds explicit types to `WebsocketInterface` methods
- Verbose documentation
Reformats documentation to 80 char width.
Makes Request type mutable, removes PartialRequest
Fleshes out documentation for RequestParser

Groups cfunction calls together under Julia function definitions.
Merge branch 'doc1' by way of 'doc2'

Closes #36
Fixes broken RequestParser.

Merge fail – how embarassing!
Adds Content-Length & trailing newlines.
Fixes memory leak with parser's global partials.

The previous methodology with `clean!` was flawed and only
cleaning up the `message_complete_callbacks`. This can be seen
using the following test server:

    using Http
    http = HttpHandler() do req::Request, res::Response
	"$(length(Http.partials)) $(length(Http.message_complete_callbacks))"
    end
    server = Server(http)
    run(server, 8000)

Then:

    > curl http://localhost:8000
    > 1 1
    > curl http://localhost:8000
    > 2 1
    > curl http://localhost:8000
    > 3 1
    > weighttp -n 500 localhost:8000
    > ...
    > curl http://localhost:8000
    > 503 1

It seems that the `clean!` method was not correctly finding
the `parser` pointer key in `partials` – since the key is being
set in C-land by `on_message_begin`.  As such, it seems to make
morei sense to do the cleanup in the `on_message_complete` C callback,
so that the full life-cycle of the global partials can be handled
inside the C callbacks.  Additionally, while the `message_complete_callback`
will remain the same for the duration of a given client connection,
the partial really is only good for a single request.

Of course, this could still potentially leak memory if requests are made
that never finish and end up calling `on_message_begin` but never call
`on_message_complete`. If we could find a way to get the `parser`
key from inside `clean!` it could make a good failsafe, otherwise
we may want to institute some kind of nth request garbage collector
function just to be sure.
Removes unnecessary newlines from response.
Fixes memory leak with parser's global partials.

The previous methodology with `clean!` was flawed and only
cleaning up the `message_complete_callbacks`. This can be seen
using the following test server:

    using Http
    http = HttpHandler() do req::Request, res::Response
	"$(length(Http.partials)) $(length(Http.message_complete_callbacks))"
    end
    server = Server(http)
    run(server, 8000)

Then:

    > curl http://localhost:8000
    > 1 1
    > curl http://localhost:8000
    > 2 1
    > curl http://localhost:8000
    > 3 1
    > weighttp -n 500 localhost:8000
    > ...
    > curl http://localhost:8000
    > 503 1

It seems that the `clean!` method was not correctly finding
the `parser` pointer key in `partials` – since the key is being
set in C-land by `on_message_begin`.  As such, it seems to make
morei sense to do the cleanup in the `on_message_complete` C callback,
so that the full life-cycle of the global partials can be handled
inside the C callbacks.  Additionally, while the `message_complete_callback`
will remain the same for the duration of a given client connection,
the partial really is only good for a single request.

Of course, this could still potentially leak memory if requests are made
that never finish and end up calling `on_message_begin` but never call
`on_message_complete`. If we could find a way to get the `parser`
key from inside `clean!` it could make a good failsafe, otherwise
we may want to institute some kind of nth request garbage collector
function just to be sure.
Merge branch 'fix-memory-leak'
Fixes memory leak with parser's global partials.

The previous methodology with `clean!` was flawed and only
cleaning up the `message_complete_callbacks`. This can be seen
using the following test server:

    using Http
    http = HttpHandler() do req::Request, res::Response
	"$(length(Http.partials)) $(length(Http.message_complete_callbacks))"
    end
    server = Server(http)
    run(server, 8000)

Then:

    > curl http://localhost:8000
    > 1 1
    > curl http://localhost:8000
    > 2 1
    > curl http://localhost:8000
    > 3 1
    > weighttp -n 500 localhost:8000
    > ...
    > curl http://localhost:8000
    > 503 1

It seems that the `clean!` method was not correctly finding
the `parser` pointer key in `partials` – since the key is being
set in C-land by `on_message_begin`.  As such, it seems to make
morei sense to do the cleanup in the `on_message_complete` C callback,
so that the full life-cycle of the global partials can be handled
inside the C callbacks.  Additionally, while the `message_complete_callback`
will remain the same for the duration of a given client connection,
the partial really is only good for a single request.

Of course, this could still potentially leak memory if requests are made
that never finish and end up calling `on_message_begin` but never call
`on_message_complete`. If we could find a way to get the `parser`
key from inside `clean!` it could make a good failsafe, otherwise
we may want to institute some kind of nth request garbage collector
function just to be sure.
Merge branch 'master' of github.com:hackerschool/webstack.jl
Changes depreciated wait_accept to new accept
Adds keep alive support

- Cleans up comments by removing obvious notes
- Moves "close" event to process_client