Static fluid cylinders and plane layers in general relativity