Added a support to set javascript id in fig_to_html.

Hello Jake,
I'm planning to use your library within my mathematical homework system I developed in Django. One of the issues I found in your fig_to_html function is generation of a random id for JavaScript elements and functions. If I want to control the generated JavaScript graph in the browser through getElementbyID or jQuery, it would be a pain in the ass. 

I added a support for the following:
1-The ability to change the figid name to the desired name
2-return template object and figid

This pull request will not break the previous fig_to_html API