A neural network-based algorithm for simultaneous event positioning and timestamping in monolithic scintillators