adds dom/index

Simply returns the index of the node if the node is in the DOM. Two things:

* I'm not too sure about the name. Is `index` a little too generic? Also having a `index.js` file might be confusing? `getIndex` is a possibility since it really is more of a getter.
*  In line 10 you can see a double negative. That is not necessery code wise but jshint complains when just writing `while (node = node.previousSibling)` since it's an assignment and not a condition. `while ((node = node.previousSibling))` is a possibility but looks horrible in my opinion. Since the `while` statement casts anyways I thought this is still the nicest way.