Ab initio study of K adsorption on graphene and carbon nanotubes : Role of long-range ionic forces