Update beam.js to handle rests and /8 time signatures

Changes to allow beam.js to more accurately beam beats with rests in e.g. beaming the other 3 1/16th notes when the first note is a rest and changing the ticks per group when a time signature has 8 as it's beat value.