An adaptive finite element method for frictionless contact problems