codecgen: account for zero external packages when generating version check in init.
codecgen: account for zero external packages when generating version check in init.

Previously, we (very wrongly) didn't account for the situation
where the type did not reference any packages outside the current one.

We now fix it by checking first if number of external packages referenced
is greater than zero.

Fixes #45

whyrusleeping/go-codec,whyrusleeping/go-codec,sunvim/go,ugorji/go,ugorji/go,whyrusleeping/go-codec,methane/go-codec,methane/go-codec,sunvim/go,sunvim/go,ugorji/go,methane/go-codec