Added check flag to expand_module() to control assertion and hierarchy
checking on expansion.
Reworked check_assertions() and hierarchy_check_constraints() to take
handles and use callback-based error reporting.
Changed expand_module() to call check_assertions() and
hierarchy_check_constraints() prior to returning the expanded policy.