The bond and cycle spaces of an infinite graph