HDFS-7486. Consolidate XAttr-related implementation into a single class. Contributed by Haohui Mai.