Fixed the renaming pass to consider forward declarations and function type defs.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>