A General Neural Network Architecture for Persistence Diagrams and Graph Classification