Probing the charge of a quantum dot with a nanomechanical resonator