safe_asterisk: Don't automatically exceed MAXFILES value of 2^20.

On systems with lots of RAM (e.g. 24GB) /proc/sys/fs/file-max divided
by two can exceed the per-process file limit of 2^20. This patch
ensures the value is capped.

(Patch cleaned up by me.)

ASTERISK-24011 #close
Reported by: Michael Myles
Patches:
  safe_asterisk-ulimit.diff uploaded by Michael Myles (License #6626)


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@424875 f38db490-d61c-443f-a65b-d21fe96a405b
Ouch! Accidental commit of wrong file in 424875.


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@424876 f38db490-d61c-443f-a65b-d21fe96a405b