Improve `rake stats` for JavaScript and CoffeeScript

`rake stats` can now calculate the number of functions and ignore block comments for JS and CoffeeScript.