Adhesion-induced instabilities in elastic and elastic–plastic contacts during single and repetitive normal loading