Evolution of the metal hyperaccumulation and hypertolerance traits