use correct domain names when registering static DHCP entries in DNS

When registering static DHCP entries in DNS, we first try to use the domain name configured for the static entry (if any), then the domain name configured in the DHCP server settings for the corresponding interface (if any), and as a last resort the system domain name.

This change was proposed by user TechSmurf on the pfSense boards; see <http://forum.pfsense.org/index.php/topic,64934.msg352331.html#msg352331>.
Merge branch 'master' of https://github.com/pfsense/pfsense into dhcp-domain-master
Merge pull request #745 from razzfazz/dhcp-domain-master

use correct domain names when registering static DHCP entries in DNS
Check if hostname is valid, it fixes #3117
Catch adaX here too
tighten overly broad regexes for SMART monitoring
Merge pull request #747 from razzfazz/tighten-smart-regex-master

tighten overly broad regexes for SMART monitoring
Show the name of the unresolvable alias name as well as the rule description to avoid ambiguity.
Show friendly interface name, fixes #3095
Fix up filter_pflog_start - optimize some code, and fix $retval so that it will be restarted correctly after killing it.
Revert "Remove unecessary variable"

This var is used below

This reverts commit b91d0be3863d55bbfe9a31d855b4a2aedae34d92.
Reorder reverse lookup overrides so user-specified ones are effective

If the user specifies a domain override for 10.in-addr.arpa and also specifies "Do not forward private reverse lookups" then the user-specified entry is not effective. But the code was supposed to allow users to specify individual reverse lookup domain overrides that took precedence.
Re-ordering the placement of the --server entries on the dnsmasq command line fixes this.
Forum: http://forum.pfsense.org/index.php/topic,64986.0.html
Merge pull request #749 from phil-davis/master

Reorder reverse lookup overrides so user-specified ones are effective