Precision measurement of the electric quadrupole moment of 31Al and determination of the effective proton charge in the sd-shell