Add implicit returns (mostly fixes #48)

* Add implicit returns to avoid changing the return value of Javascript functions with no explicit return.
* Still doesn't completely solve the problem when a function ends with a switch statement.
* Remove failing unrelated test to pending (relating to issue #154) so the tests pass.
* Add pending test for a broader problem with the way returns within switch statements are handed.