Gradient-Based Model Fingerprinting for LLM Similarity Detection and Family Classification