During what geologic period did the bony ray-finned fishes diversify tremendously and begin to dominate the aquatic habitats of Earth and when the lobe-finned fishes first appeared.