A general hierarchical ensemble-learning framework for structural reliability analysis