Optimization of Drying-End-Points Measurements for the Automation of a Fluidized-Bed Dryer Using FT-NIR Spectroscopy