Verification-Aided Learning of Neural Network Barrier Functions with Termination Guarantees