Support legacy attach hooks for atom core compatibility

If you set useLegacyAttachHooks to true on the view prototype to true,
then afterAttach and beforeRemove will be used to drive the attach hooks
instead of custom elements, allowing for simulated DOM attachment to
still work. This feature should never be used outside of Atom core, so
I will leave it undocumented. It’s required to preserve behavior, but
we can’t commit to it going forward.
4.1.0