[#58] load the latest version of the nginx module
[#58] load the Nginx server file so it can be used
[#58] fix the code generating sections for each device
[#58] disable logging and move the pid to the data docroot to make nginx backend less architecture dependent
[#58] remove a couple unnecessary configuration directives per Gernot's recommendation

tcp_nodelay defaults to on, so there is no need to specify it
remove unnecessary error_page config, there is no need for pretty error pages
[#58] only specify the root once in the server directive instead of for each configured location
[#58] relocate the prefix directory to keep nginx from conflicting with other running copies. Thanks Gernot for the heads up
[#58] store the nginx pid in the prefix dir and reduce the scope of the variable
clean up formatting, no functional changes
[#58] die if nginx fails to start
[#58] utilize non-daemon mode for nginx >= 1.0.9
[#58] relocate all temp_path's to a temp path specific to mogstored

this attempts to prevent conflicts with other running instances of nginx
[#58] support nginx server type in command line options
Moved utf-8 config to http block
if one really wants to be root - let him be
Reseed the random number generator after forking.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Pull out device sorting into it's own method for overriding.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Do both sorts in one method, to save on shared initialisation.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
worker: set monitor_has_run flag at initialization

This way the queryworker will know it won't have to
wait again for the monitor to run.  This allows
users to (manually) set higher intervals in Monitor.pm
without noticing ill effects.
monitor: remove dead iostats code/comments

* set_observed_utilization() is a no-op, and can be
  safely removed.

* Looking up the device via factory does not incur DB hit
  since the factory changes of May 2011.

* Really avoids propagating invalid devids with correct ordering
  of the hash assignment.  This prevents an invalid devid from
  hitting even the {devutil}->{cur} hash which lasts the
  lifetime of the monitor process.