boost::mpl: internal algorithms and helpers

Signed-off-by: Alex Dubov <oakad@yahoo.com>