QOC: Quantum On-Chip Training with Parameter Shift and Gradient Pruning