Process-analytical technology investigation of the crystallization of pharmaceutical polymorphs, salts and hydrates