Align With Purpose: Optimize Desired Properties in CTC Models with a General Plug-and-Play Framework