A low-budget Chinese animated film, mocked for its poor quality, has become a surprise box office hit as internet memes turned it into a cultural phenomenon.