Custom field validation should pass when empty and min length > 0

Fix for #12029 (commit 9c71d4f884200f682636e772cf3584202fc2443d)
introduced a regression in the validation of numeric custom fields when
the field's minimum length is greater than 0 and the data being
validated is empty. This prevents e.g. reporting of new issues with a
hidden custom field, or updating issues having a non-required, empty
field.

This commit resolves the problem by passing validation when the field is
empty. This should not cause problems for required fields, as that case
is covered by an earlier check in bug_report.php and bug_update.php.

Fixes #14516
Fix #14192: Add Exchange header for automessage
Localisation updates from http://translatewiki.net.
Fix long URL formatting causing bugnote/text to be blank

When MantisCoreFormatting plugin processes text (e.g. bugnote)
containing a long URL, a PREG_BACKTRACK_LIMIT_ERROR may occur in
string_insert_hrefs() when replacing email address links with
preg_replace_callback(). When pcre.backtrack_limit = 100000, the longest
URL that can be processed successfully is 152 chars. A bigger URL
triggers the PCRE error and the function returns NULL.

This was introduced by commit 21a3469d1039c21fbf52796f23a95ab18856254a.

We now use preg_split() instead of preg_replace_callback(), which is
more efficient and avoids the backtrace error issue

The url replacement string was also moved to a variable to make code
more readable.

Fixes #14447
Email hrefs in bugnotes should include 'mailto:' prefix

Hyperlinks to email addresses generated when processing bugnotes and
description fields should include the 'mailto:' prefix if it exists

Fixes #14547
Documentation: improve troubleshooting for error 1502
Fix new signup user is protected account on PostgreSQL

This fixes a regression introduced with resolution of #14288 (see commit
b8d4b5039598248d0b0c78619450c51d4dc98df2)

The user_create() function was not properly resetting the account's
protected flag to false due to specific handling of Boolean type as a
string for PostgreSQL.

Fixes #14466
Fix #14550: Incorrect values for date_order field when using
mc_project_version_add() 
Fix #14550: Incorrect values for date_order field when using
mc_project_version_add()

Fix double key in VersionTest ( thanks to atrol ).
Add event to allow plugins access to the bug change status form

This is a back-port of 5409ebc4e69bed8f8fa55129703d0d74e24f6a2f.

Fixes #10126, #14329

Conflicts:

	core/events_inc.php
	docbook/developers/en/event-reference-bug.sgml

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Renaming EVENT_BUG_CHANGE_STATUS_FORM to EVENT_UPDATE_BUG_STATUS_FORM

This is per jreese's recommendation, for consistency with existing
events names.

Fixes #14329, see also #10126
Cosmetic changes and comments in admin/check.php
Fix #14552: Update admin checks to make sure ADOdb extension is not used
Localisation updates from http://translatewiki.net.
api soap: correct usage of bugnote_set_view_state

Fixes #14573: Updating an issue's view state always sets it to private 
Fix #14574: MSSQL server 2005 as minimum version
Documentation: RDBMS support note
Fix #14558: Monitors get lost when calling mc_issue_update via SOAP 
mc_issue_api: correct comment styles

Affects #14558: Monitors get lost when calling mc_issue_update via SOAP 
Fix #14587: Dynamic value lists of enumeration custom fields not working for category