Container#AllocateNetwork: Simplify error handling.

The defer logic was a little tricky and was hiding one bug: `err` was
being redefined (with `:=`) and thus it escaped the defer error checking
logic.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Merge pull request #8431 from aluzzardi/b-alloc-network-error-handling

Container#AllocateNetwork: Simplify error handling.