A self-consistent mechanics method for solids containing inclusions and a general distribution of cracks