fix MethodFormat.getCodeSource NPE
Merge #757, that also closes #751. Update History.md.

Also fix indentation of MethodFormat.getCodeSource.