Add JavaScript API for IO

Will allow testing/simulation of IO stimuli and response.
lib: Improve Simulator API, add more convenience