Revert "CRM-13379 js, contribution form - generalise  button double submit protection and add to contribution.main to prevent double submits where people have no confirm page"

This reverts commit 7946e27e9b6be7f4659d29ca667f7decce87761c.
Revert "CRM-13397 js.common also backport js ts function, other changes are only formatting"

This reverts commit 8603e0a2d88f76a2fae846b66a9390b4c40ed03e.