Volumes of line bundles on schemes