Gas spring with two-way pneumatic damping