HDFS-6851. Refactor EncryptionZoneWithId and EncryptionZone. (clamb via wang)

(cherry picked from commit 33ce887c20ec806ace02063e42599c3db76b536a)