Fix a bug with child package, improve support for foreign package

When I compile a proto file defining a Message `com.a.A` with dependency of `import com.a.b.B`, all the `com.a.b.B`s are printed `b.B` which is not a valid syntax.
I made a test case `testChildPackage()` that reproduces this issue.

My approach is to get a package string from a type using javaSymbolMap, then replace `startsWith()` comparisons with package comparison.
There might be few effect other than just resolving this issue. Types imported from foreign package are now printed more cleaner. (see `SimpleMessage.java`)