UI: Use std::unique_ptr for ui variables

Most ui variables were using std::unique_ptr, but not all.
Went through all of the UI code to find where they were manually
deleted.
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f