select.add() should support optgroup adding and before index

According to the spec (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-select-element) the idl for select.add is
void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);

select.add should accept an optgroup as the first argument.
select.add should support an index as the second argument.

BUG=345345

Review URL: https://codereview.chromium.org/213773003

git-svn-id: svn://svn.chromium.org/blink/trunk@170259 bbb929c8-8fbe-4397-9dbb-9b2b20218538