TRAMS: Training-free Memory Selection for Long-range Language Modeling