[Module] Try harder to associate each instruction with source level debug info.

 - This makes KCachegrind output look nicer, as otherwise it assumes
   instructions without debug info were inlined and shows some message to that
   effect.

 - This does however we might be lying a bit about the source line that an
   instruction came from.

 - This also adds a test case for our istats output, yay!
[Core] Fix a bug in how source file names were written in .istats files.

 - KCachegrind appears to expect the first function name to be preceeded by the
   name of the file it appears in. Otherwise, it will end up creating two
   different records for the function, one of which has no file name and won't
   have any statistics.