bpf: Do not open device for generating filter

Also, refactor code a bit to make it cleaner.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>