8186166: Generalize Atomic::cmpxchg with templatesReviewed-by: dholmes, coleenpContributed-by: kim.barrett@oracle.com