Quantum accelerated approach to the thermal state of classical all-to-all connected spin systems with applications to pattern retrieval in the Hopfield neural network