Optimal regularity for the Signorini problem and its free boundary