Rename try_alloc() to mik_try_alloc().

The name try_alloc() is rather general, and it would be safer in
miknet's namespace.
Move error constants into miknet's namespace.