Quantum gas microscopy for magnetic field imaging and current density mapping of nanostructures