Global Search Scope: Remove "Current Application" when not searchable
Summary:
Do not offer "Current Application" in the global search scope dropdown in the top bar's search area when there is no Current Application or when the Current Application does not have any searchable document types defined.
Unconditionally exposing "Current Application" is a source of confusion:
* Currently the user has no way to find out if the Current Application has any searchable document types (for example, the Search or Legalpad applications do not). In this case, selecting "Current Application" does the same as the previous option "All Documents". But you cannot find out when that's the case so it "feels" unreliable for reasons you may not understand.
* Furthermore, the user might not even know or understand Phorge's concept of "applications" and/or which application they are in. Ideally every user understands every paradigm of a software application like Phorge; in reality nearly nobody has time for that.
Plus also remove an unused `$application_value` variable in the code.
Closes T16158
Test Plan:
* Go to http://phorge.localhost/whatever404, click the Search Scope dropdown in the top bar, get no "Current Application" option as there is no application
* Go to http://phorge.localhost/search or http://phorge.localhost/legalpad, click the Search Scope dropdown in the top bar, get no "Current Application" option as the application has no searchable documents
* Go to http://phorge.localhost/maniphest, click the Search Scope dropdown in the top bar, get "Current Application" option as there is an application and it has searchable documents
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16158
Differential Revision: https://we.phorge.it/D26175