Add api-test script and test that curve name passed in is valid.

Hey,

I added an api-test.js script and a test to make sure the curve name passed in was valid. I had passed the curve name with a capital letter initially and having no error thrown meant I needed to spend extra time debugging what was happening so I figured I'd toss out a pull request to maybe save someone else the same time...

After running make, the dist file had quite a few extra diffs I wasn't expecting. All I intended to add were the changes to `lib/elliptic/ec/index.js` and `test/api-test.js`.
I'd rather do `elliptic.curves.hasOwnProperty(options)`