AutomationEditor: horizontal grid drawing improvements

* Time signatures differing from 4/4 work now
* Scrolling is more in sync with the timeline
* Lines are now drawn: whole bar (thickest), time signature beat, quantization (thinnest)
* Closes #283, closes #303

This is a re-PR on the master branch, to replace the old one that was on stable-0.4