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.
refactored object -> noun mapping for API URI creation. No longer directly evals vs Object. Now can be changed within Object depending on state.

Fixes incorrect noun for Active Model which is a Policy object in a final state
Merge remote-tracking branch 'harrypan/tb/case_class' into harrypan/case_class
Added removed comments
Cleaned up old debug lines
Removed obsolete unit test
Getting Web Options should return an empty Hash object and not nil if nothing is found.
Wasn't passing the noun key on multiple item web request. Required for generating uri.
added logging for file transfer with image.svc
Merge remote-tracking branch 'upstream/master'
Fixes issue with non-persistent hostname in the Ubuntu Precise model (per virtualswede's request in issue #119)
Fixes issue with non-persistent hostname in the remaining models that use this same construct in their os_boot.erb file (per ChrisLundquist's comment to the merge request already submitted as issue #122)
Fixes broken range requests for Centos/RHEL based distros
Updated preseed config so that warnings will not be thrown if old LVM config exists on disk
Fixes #130 and a couple of other (unreported) issues that resulted from recent changes to the way that the Razor configuration is obtained by the RazorDaemon class defined within this script.  Previously, this class accessed the configuration directly (as an object), but changes that were made to the razor_daemon.rb script to fix a log rotation error (Pull Request #117) meant that the configuration was now returned through the Razor web API (which means that the keys in the resulting hash are all prefixed with an "@" sign). As a result, the previous code (which used a line like "node_expire_timeout = razor_config['node_expire_timeout']" to obtain the "timeout" value to use for node expiration) no longer returned the desired value from the Razor configuration.  Instead, a line like "node_expire_timeout = razor_config['@node_expire_timeout']" had to be used to obtain this same value.  This commit makes all of the appropriate changes to the razor_daemon.rb script to resolve issues from this recent change to how the Razor configuration values are returned to the razor_daemon.rb script from its RazorDaemon class. This also fixes an undiscovered issue with retrieving the daemon minimum cycle time (how long the daemon waits between cycles of it's event handling loop) from the Razor configuration as well as an undiscovered issue with how the persistence host/port are reported as part of the error that is printed when the database connection fails.
Merge remote-tracking branch 'upstream/master'
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