is quartz a mineral or a rock