Fixed bugs and cleaner loop over childNodes

Tests: http://jsbin.com/uhoVibU/4

Resolver correctly identifies most mutations
Removed confusing continues in loop in favour of an offset counting
removed nodes
Fixed a bug in findIndex
Added internal function to set ids on all children
Improved comments