Refactor and interface update.

Made a few changes here:
* `kyapply` has been replaced by `Differentiable`, which wraps functions
  with the appropriate argument-dependent behavior. This can also be used as
  a decorator to build user-defined primitives.
* numpy and operator modules are *modified directly*. (This may be a bad idea...)
* Split core.py into separate files.