Learning without a brain – how bacteria store memories and remember the past like artificial neural networks