Adds onAttach triggerMethod.

Adds `triggerAttach` and `beforeTriggerAttach` triggerMethods.

This is the 3rd out of 3 PRs to get #1886 in.
any reason not to make these empty functions `sinon.spy`'s. That way we don't need the assignments below.