[s0634] Add dummy effect of spell 38194 and limit it's maxTargets

Correct order of spellfamily case.
Note: triggered spell 38203 needs target map fill

Signed-off-by: NoFantasy <nofantasy@nf.no>

(based on commit 725d595)
[s0635] Some cleanups in MailDraft API

* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items (or bory itemTextId) its can't be just shared
  and need preoprtly cloned, but item close is high price operation (guid use, DB touched and etc)
  So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.

(based on commit b5bd067)
[s0636] Implement mass mail send infrastructure.

It expected to be used in 2 case: some gameevent must send mails at start/end,
and this can be useful in game commands. Both case wil implemented in later commits.

* New MassMailMgr can accept tasks for send mass mails in safe way for map update threads context/etc.
* It work in way:
   - By provided race mask or more generic SQL query string in async query selected affected characters
   - At query result ready at next world tick update in safe common part of tick code some from mails
     from queued mas mail tasks send.
   - Amount mails limited MassMailer.SendPerTick confir option (10 by default). This done for prevent
     high server load/lags at send too many mails in one tick (mail send all existed characters in DB
     who match to seelction criteria)
   - Server wait at shutdown complete mass mail tasks. This is now slowdown shutdown lot:
     with default setting 10K mail send in 20 secs (10000/50/10).
   - But manager not persistant for server crashes so any not send mails in queue lost at crash.

* Implement mass mail gm commands.
  New comamnds mirror related normal sedn commands:
   - send mass items
   - send mass mail
   - send mass money

  Instead player name it expect or numeric racemask or textual race/team name or 'all'.

* Implement game event mail sends at event start/stop.

  Also implement save game event state to DB mostly for avoid
  send mails at resume game event after server downtime.

Thanks to X-Savior for inspiring and original research.

(based on commit f5c63c4)
(based on commit 534683c)
(based on commit 35028c6)
(based on commit e2e18ec)
(based on commit 84e29e0)
(based on commit dbc97cb)
(based on commit 96df816)
[s0637] Report error about not existed item loot data only if item not have money loot.

(based on commit 06f6f62)
[s0638] Add ghost speed rates in config: Death.Ghost.RunSpeed.*

Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

(based on commit 1fe6ac3)
(based on commit 4f1ca1d)
(based on commit c057c81)
[s0638] Fixed spell 18790 unexpected spell power bonuses.

Also fix server startup error for spell 12880
by using data originally suggested by siduskana as more correct.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
[s0639] Optimize memory usage of Field class used in DB code. Should also slightly speedup server startup time.

Signed-off-by: Ambal <pogrebniak@gala.net>

(based on commit 4b347cb)
[s0640] Config option for disable progress bar show at server startup.

Make happy nervouse ppl by some secs startup speedup.

(based on commit 5867cde)
[s0641] Alow implicit copy constrictor call for fix build at some compilers.

(based on commit 4f8ebec)
[s0642] Cleanups in ThreatManager.h

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

(based on commit 4133018)
Add peeking support to LockedQueue.

Also make DB code thread-safe. Original patch by Machiavelli and Kero99.

(based on commit ea13ac3)
(based on commit 6bc7e97)
[s0643] More safe for use PET_FOLLOW_ANGLE define.

(based on commit 9ccbdbf)
[s0644] Avoid use StopMoving when creature is already stopped.

Some additional code cleanup in related code.

(based on commit 14b21d8)
[s0645] Battleground queue related backports

(based on commit 4601ed3)
(based on commit 877e963)
(based on commit 6dd33ca)

New attempt backport bg related commits. Please report stability porblems if its showup after this commit.
[s0646] Team related cleanups in generic code and battlegrounds code.

Use BattleGround(AV)TeamIndex enum types in AV battleground code.

* Added BattleGroundAVTeamIndex enum type for 3-case special team list fo AV.
* Rename BattleGroundTeamId -> BattleGroundTeamIndex for clarify
* Some safe checks added and dropped bogus call RewardReputationToTeam in BattleGroundAV::HandleQuestComplete
  for BattleGroundTeamIndex as faction. Unclear for what it expected used so dropped.

Use Team enum types in all appropriate cases and catches bug in result fix.

* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.

(based on commit 83e7f13)
(based on commit 8fcfddf)
(based on commit 3faa764)
(based on commit 17693a6)
(based on commit 9373719)

Thanks to mns for research code and help  for this and prev. backport commits.
[s0647] Fixed linking porblem for scripting library.

Visual Studio have known porblems with make public (in DLL access meaning)
for private fields accessed by public inline functions.

(based on commit b74660e)
[s0648] Remove unused aura caster get.
[s0649] Prevent deleting reflect source aura ebfore reflected spell cast.

(based on commit 419774c)
[s0650] Sort Unit::HandleDummyAuraProc generic family spells in case.

(based on commit 80ea28d)
[s0651] Some comments from not backportable commit.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

(based on commit 140f3f1)