Following Sean Parent's advice, rewrite a manual loop to use an algorithm, and refactor the body of the original loop
into a predicate.

This also reduces the complexity of the site checking algorithm - the predicate runs in constant instead of linear time.
use boost::iterator_range instead of std::pair<iter_t, iter_t> for compatibility with C++11 ranges
eliminate row/site "body" substructure for better readability and more compatibility with lexer-based parser
use range-based foreach (C++11) for improved readability
replace another raw loop with an algorithm per Sean Parent

Conflicts:
	apps/simple_viewer.cpp