Preference for toggling preprocessor prototype generation

Added preproc.generate.prototypes preference setting to disable the generation of function prototypes (also done some cleanup) - Issues: #2304, #992 and #386 (workaround)