Add deprecated header

Move all global functions and variables into `CCDeprecated.h`.
Re-add some global functions and variables and mark them as deprecated.