map: allow empty ProgramArray to not be assigned
map: allow empty ProgramArray to not be assigned

xdpcap [1] used ProgramArrays to implement hooks in XDP programs.
So far, it's been possible to add an xdpcap hook without calling
into the library to patch the ProgramArray. The change to support
pre-populating tail call maps broke this, since we now don't allow
ProgramArrays which are loaded but not requested by the user.

However, this case it is OK for the ProgramArray to be closed since
there are no programs in it anyways. Make the error less strict by
allowing empty ProgramArrays to be unassigned.

1: https://github.com/cloudflare/xdpcap

cilium/ebpf,cilium/ebpf