Goal-oriented Communications based on Recursive Early Exit Neural Networks