Normalize the name of ticket related resources (milestones, components, versions and enums), so that they are not only stripped but they shouldn't embedded sequence of whitespace either (as this badly interacts with the <select> form elements). Closes #4058.