UndoHistory Enhancements

- Add Upper bound to history size
  (currently hardcoded to 20, but it should be easy enough to expose this to a
  public api)
- Allow non-top event to get collapsed on frequent updates
  (This helps considerably with 2D controls, which otherwise would overflow
   history very quickly)
Add new experimental midi api