Add raw SQL representation in admin

This is useful for debugging and as a quick reference. This introduces
and optional dependency sqlparse which pretty formats SQL if installed.