changed optional argument syntax of \img command (img.js extension) to be more LaTeX-like

Optional arguments are now given either as 

    \img[valign=<valign>,width=<width>,height=<height>]{URL}

or

    \img[<valign>][<width>][<height>]{URL}

which are both common ways to supply optional parameters in LaTeX (the latter is usually used when there is just one optional argument). Example in http://jsfiddle.net/c6sy534g/