lib: Add finito.Definition.fromHttp()
lib: Update JavaScript Machine impl with recent additions

These were already added to the C machine implementation
* Pass a context argument to functions
* Pass custom parameters to functions, normalized to number when needed
* Execute .leave and .enter actions when transitioning between states