Splits a function definition into a declaration and definition and moves the definition to the source file if applicable.