The balance between fitness advantages and costs drives adaptation of bacteriophage Qβ to changes in host density at different temperatures