Remove repeated code and optimize case statement.

Note that internally Ruby uses === for case statement so when testing
for an object's class, "case object" is the correct way.  See

http://ruby.about.com/od/beginningruby/qt/On-Case-And-Class.htm

Previously the object under question has been converted to a string for
comparison.  This works now, but it's a little dangerous because it
assumes that the string representation of certain classes (String,
Symbol, Hash, etc.) do not change over time.
Changes to the Debian, Redhat, and Ubuntu models (and their sub-types) to support setting of the domain name for the model (with a default value of "localdomain") and to support adding that hostname and domainname to the /etc/hosts file (so that the name will resolve correctly, at least locally).
Merge remote-tracking branch 'harrypan/tb/case_class' into harrypan/case_class
Added removed comments
Cleaned up old debug lines
Changes to ensure that the hostname and domainname set in the model are reflected in the /etc/hosts file on the local system (take 3). The first commit on this topic had issues with the sed command used in the post-boot script constructed by these four models. The second commit got around the issues with the first commit by restricting the pattern matched in the /etc/hosts file created by the OS install to just the line that had an IP address of "127.0.1.1". This commit loosens that restriction (by using two 'sed' commands instead of just one) so that the lines that look like 127.x.x.x but don't match 127.0.0.1 will be modified to look something like "127.x.x.x    hostname.domainname    hostname" (which will effectively set the fully qualified hostname and the domainname for most modern Linux systems).  This change has been tested under Ubuntu 11.10 (Oneiric), but should work under Ubuntu 12.04 (Precise), Debian Wheezy, and RedHat6 (which is also used by the CentOS model).
Take four on a set of changes to ensure that the hostname and domainname set in the model are reflected in the /etc/hosts file on the local system. The previous commit on this topic might have had issues if there were multiple 127.x.x.x lines in the file (aside from the non-loopback line).  This commit only changes the first 127.x.x.x line in the /etc/hosts file and leaves the /etc/hosts- file in place as a backup of the original file (for comparison). Eventually we might want to remove this file at the end of the grep/sed command sequence that is modifying it.
Fix for range error in matching the non-loopback local IP addresses during the sed command...
Fix to range of tail command (was pulling one extra line...starts with line 1, not line 0
Revert "Merge pull request #72 from nanliu/tb/cli"

This reverts commit e9a298e38e97e243217974b84e670472049eed6b, reversing
changes made to 6f47e7297280b5d42c6ff549d2a9438711c4efe2.
Merge pull request #136 from nanliu/tb/revert

Revert "Merge pull request #72 from nanliu/tb/cli"
Merge pull request #134 from tjmcs/tb/etc_hosts_model_fix

Changes to add hostname and domainname set by model to /etc/hosts file
New DHCP Mac discovery for OS Installers

Updated models: ESXi, Ubuntu, Debian, Centos to use new dhcp mac discovery

razor.ipxe script must be regenerated. This can be done with:
```
razor config ipxe > /var/lib/tftproot/razor.ipxe
```
Fix the single level domain name restriction in #138
Add ability for subdomains in debian and redhat #138
Take tjmcs's better regex for RFC domain name compliance #140
Take tjmcs's better regex for RFC domain name compliance #140
Merge branch 'master' of github.com:tomvachon/Razor
Add missing changed commit #140
Merge pull request #140 from tomvachon/master

Changes to support proper DNS names in the validation used for the new domainname parameter for these three models; the new pattern supports the requirements for DNS names in [RFC 1034](http://www.ietf.org/rfc/rfc1034.txt)
Merge pull request #131 from lynxbat/master

Refactored object -> noun mapping for API URI creation