Applications of low-density foams for x-ray source studies and laser beam smoothing