Properties, Learning Algorithms, and Applications of Chain Graphs and Bayesian Hypergraphs