Patch-aware Vector Quantized Codebook Learning for Unsupervised Visual Defect Detection