Memristor-based Synaptic Sampling Machines