Inline documentation for can.inserted

Also made can.insertBefore and can.appendChild use the same logic, to reduce code size. Fixes #755