Inside factorial monoids and integral domains