Validate num_threads setting.

Previously SequenceServer would assume 1 thread if num_threads wasn't set, or
set incorrectly in the config file. I think we should use a default value only
if one wasn't provided by the user. If the user explicitly sets a configuration
value, and it's incorrect, we should alert the user instead. Additionally, we
warn the user if num_threads is greater than 256.

Explicit validation caught an error in our code where num_threads, if not set
in config file, was assumed to be 0 in Ruby 1.8.7.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Do not convert Database#type to a symbol. And Slightly refactor Database class.

At one point we group by and sort a collection of databases by their type. But
Ruby 1.8.7 doesn't allow sorting of symbols.

Refactoring - use Struct.new{} syntax and document members.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Blast::Query: Work around that Array#sort_by! is not available in Ruby 1.8.7.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Float#round doesn't take param in 1.8.7. Use sprintf.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>