Return a 400 when a request includes an invalid host header

Fixes #143

Return a 400 Bad Request instead of 500 when a request includes an
invalid host header. Also update the error logging used in
webmachine_mochiweb:handle_error/3.
Handle undefined request time values in performance log handler

Handle the case where the end time or finish time fields of a log data
record are undefined when calculating request times in the performance
log handler. This situation can happen when the request contains an
invalid parameter and is not handle by the decision core module.
Avoid keeping extra request state any longer than necessary

Only keep the request state information that is embedded into the
request data record as long as necessary. This avoids the overhead of
large amounts of unused and repetitive request state and request data
record information being aggregately accumulated during the lifetime
of a single request.
Replace use of dict with orddict in request records

The dict type wastes a good deal of space and is not the most
efficient type when total items is relatively small. The uses of dict
are cases where the size should be relatively small so using orddict
instead should have space and performance benefits.
Update metadata initialization in metadata_test
Merge branch 'klm-handle-invalid-host-header'
Merge branch 'klm-reduce-request-overhead-rebased'