Implemented CCDictionary::writeToFile with CCDataVisitor.

1. More strict code with wider types set.
2. Visitor is faster than dynamic_cast.
3. Added fully automatic tests.