DEV: Add ENV variable for enabling MiniProfiler snapshots (PR #10690)

Also add a tiny before_action hook that adds Discourse version to snapshot.

GitHub