Text this: A Novel Access Control and Energy-Saving Resource Allocation Scheme for D2D Communication in 5G Networks