FLASH: Flexible Learning of Adaptive Sampling from History in Temporal Graph Neural Networks