A General Approach for the Reconstruction of Complex Buildings from 3D Point Clouds Using Bayesian Networks and Cellular Automata