Fix bug when creating a model with {init: false}

The events 'created' and 'ready' were not properly emitted.
The table was also not set as ready, and query could not properly be
run.
Implement a basic optimizer - #59

When a model is created, `tableList` is called and the indexes
are stored. The indexes created through hasOne/hasMany/etc. and
ensureIndex are also stored.

The commands `orderBy` will default to an index if one is found (with
the same name). The command `filter({field: value})` is converted to
`getAll(value, {index: field})` if an index `field` exists.

Note that the query is optimized when you call the command (not when you
call `run`). So if you want to makes sure that your query get optimized,
run them once the model is ready (listen to the `ready` event).
Bump to 1.13.11