Refactor module structure and add test script.

The module has sub-components that depend on one another. The init.lua
script exports only the public API for library clients as opposed to the
internal library API.
Improve command CODES catefories.

Add a 'system' table to the mid.event.CODES table.
Change ctype to midi.

The things that were called 'ctype' here are commonly referred to as
'mwidi events' on the Internet.
Begin types that allow building MIDI datasets.

These tools allow loading .mid files and rasterizing them so that they
may be used with Torch7 as input to learning machines.

Note that this is not complete as of this commit.