Transition from three to a near two-dimensional metallic state in C6Li