erts: Fix copy error in erlang:delete_element/2

Off-by-one error in element copy.
erts: Refactor erlang:insert_element/3 for clarity