Layer-Wise Modeling and Anomaly Detection for Laser-Based Additive Manufacturing