A semidefinite programming hierarchy for packing problems in discrete geometry