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).