Foreign investment in China declines in H1