Ticket #47374 - flush.pl is not included in perl5

Fix description: replaced obsolete flush.pl and getopts.pl with
perl5 equivalents.

https://fedorahosted.org/389/ticket/47374

Reviewed by Rich (Thank you!!)
(cherry picked from commit 8bb10ab2c2a1283aac4540a023acb0361f56f003)
Ticket #47409 - allow setting db deadlock rejection policy

https://fedorahosted.org/389/ticket/47409
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.3.1
Fix Description: Add the db config attribute nsslapd-db-deadlock-policy.  This
takes values from 1-9.  The values correspond to the deadlock detector modes
in db.h.  These are the valid values to pass to the DBENV->lock_detect
method for the atype parameter.  The default value is 9 (DB_LOCK_YOUNGEST) -
select the youngest locker and reject it.  A value of 0 (DB_LOCK_NORUN) means
to disable deadlock detection and rejection - not recommended except for
testing purposes.  Attempting to use other values will cause an error.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: yes - document new config parameter
Ticket #47409 - allow setting db deadlock rejection policy

https://fedorahosted.org/389/ticket/47409
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Forgot to add flags parameter to last commit.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: yes - document new config parameter
(cherry picked from commit 67cbb2eac1300ae57acf75f4c3299103046a3323)