Add tests for network registration.

While here, fix a bug found through testing.  Register will now return
ErrDuplicateNet if the caller attempts to register any of the standard
network parameters provided by this package.

ok @davecgh
Test panic for converting invalid sha strings.

ok @davecgh