Events interface

regarding #1 , this PR adds the called events interface and also a implementation of flow control to deal with grbl nicely.