Implemented protocol message filtering

- Removed defaults state, implemented general superstate inheritence.

- Allow client_initialize to set initial event.

- Remove distinction between internal/external states.

- Process incoming requests selectively per state, queuing unhandled
  requests in mailbox. This allows mixing of internal/external events
  in states.

- Added "*" event for unhandled protocol events.

- Updated README.md for new functionality.

- Renamed _setoption method to _set for simplicity.

- Simplified s_client_execute somewhat.

- Fixed illegal memory access on expired clients.
Merge pull request #42 from hintjens/master

Implemented protocol message filtering
Fixes to codec generator

- we do NOT use camelCase, please
- we do NOT use variable names like 'i'
Simplified use of class.has_repeats
Added zlog (syslog) support into server engine
Merge pull request #43 from hintjens/master

Minor code cleanups
Switched server engine to using zloop

- added handle_socket () hook for application sockets
Engine API methods all start with engine_

- Meant to make methods more consistent with the CLASS standard.
Exit properly on Ctrl-C

- has to signal to zloop that a recv failed
- has to only do terminate handshake when destroyed via API
  rather than reacting to Ctrl-C
- also check that bind commands succeed (assert if invalid)
Fixed 'echo' handling in config files

- was incorrectly looking for echo at wrong level
Expand headers before BNF

- also cosmetic indentation fixes
Merge pull request #44 from hintjens/master

Improvements to engine generator
Stability fixes

- left client timers active when destroying client, leading to invalid
  memory access within zloop (crash).

- did not free zlog per server, leading to memory leakage.
Fixed issue in BNF grammar

- for dictionary items was not flagging longstr as used
- so some protocols (FILEMQ) had missing terms in them
Added CZMQ_EXPORTs for Win32
Added log and config to server_t

- lets application do logging
- lets application access loaded config data
Ensure client IDs are always unique

- when starting multiple server instances, each would start with ID 1
- this made it impossible to distinguish different clients
- now each server starts at random ID (0..1000)
Merge pull request #45 from hintjens/master

Stability fixes and other changes
Fixed bad travis file
Merge pull request #46 from hintjens/master

Fixed bad travis file