First direct double-beta decay Q-value measurement of the neutrinoless double-beta decay candidate selenium-82 and development of a high-precision magnetometer