Energy Evolution and Acoustic Emission Characteristics of Uniaxial Compression Failure of Anchored Layered Sandstone