Backport Appropiate NAT Setting Cleanup

In ASTERISK-20904, the focus was around the changes to NAT that took place in
Asterisk 11.  Since the report stated that 1.8 was fine, we didn't take a look
at 1.8 at the time.

While working on ASTERISK-21225, I could see that 1.8 would benefit from having
some of those changes applied to it.

This patch does the following:

* The important part of this patch is that it sets the peer's flags earlier in
  build_peer so that the code properly uses the peer's flags based on the peer's
  configuration.
* constify req parameter in check_via()
* update realtime schemas under the contrib directory to handle properly the NAT
  settings available in 1.8 as well as to handle the changes made in 11 to make
  upgrading easier when installing newer versions of Asterisk

(closes issue ASTERISK-21243)
Reported by: Michael L. Young
Patches:
    asterisk-20904-changes_for_1.8.diff Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2422/


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