Fixes U4-2354 MiniProfiler - Show SQL parameter values and more stacktrace info

Refactored duplicate code
Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3