I crunched the numbers on 8,190 movies to discover which types stay profitable even when the critics are unkind.