More plugin error messages improvements

- ERROR_PLUGIN_PAGE_NOT_FOUND: Add plugin basename and page name
- ERROR_PLUGIN_FILE_NOT_FOUND: new message based on above
- New specific messages for invalid page and file specification
  (ERROR_PLUGIN_INVALID_PAGE and ERROR_PLUGIN_INVALID_FILE) instead of
  using ERROR_GENERIC

Fixes #17368
Plugin API: consistent handling of MantisCore pseudo-plugin

- return true and not 1 if we declare return type to be boolean
- plugin_is_installed() returns true for MantisCore since by definition
  it is always installed
Remove direct access to $g_plugin_cache global variable

Introduces 2 new API functions
- plugin_is_registered()
- plugin_get()

Fixes #17366
Code cleanup and whitespace

- Use Closure instead of defining a function to sort plugins
- Remove unnecessary variable assignments
Revise plugin file regex to allow multiple '.' in filename

Allows inclusion of plugin files named like file.name.ext