General theory of polycrystalline ENDOR patterns. g and hyperfine tensors of arbitrary symmetry and relative orientation