A versatile and compact USB system for electrical and thermal characterization of non-volatile memories