a rock that forms from cooling lava is classified as an