MeqTrees-based frameworks for simulation and calibration of radio interferometers