Vim: make module.exports JS snippet smarter

I usually want to export the PascalCased filename, so I made my snippet
do that automatically.

I stole this code from my JSX createClass snippet. I wanted to define a
function that could be used by both to keep things DRY, but I did not
find the way to do that.