Reinforcement Learning in the Sky: A Survey on Enabling Intelligence in NTN-Based Communications