Thermoregulatory cost affects territorial behavior in hummingbirds: a model and its application