Effects of device geometry and material properties on dielectric losses in superconducting coplanar-waveguide resonators