Estimating Density Models with Complex Truncation Boundaries