build: fix shared-after-static build

Executing `make libuv.so` after `make libuv.a` failed because the
libuv.a target compiled the files in src/ without -fPIC.

Make the libuv.so target depend on files with a different suffix to
keep them separated.
Add common uv_udp_* error checking.