Stable Pairs and Gopakumar-Vafa Type Invariants for Calabi-Yau 4-folds