reservation with replacement improvements

Improve the logic for advanced reservations with the "replace" flag
to select idle nodes for use. Preserve nodes already in the reservation
as needed (when not free idle nodes exist).