Add support for variable arguments to PANIC

Now PANIC can be used with printf-like variable arguments, which is useful to provide more detailed informations about a crash.

Sorry, this is a big commit, but it was hard splitting it into smaller meaningful patches.