Make sure f_score is a consecutive list at all times

Since `f_score` is iterated over using `ipairs()`, it must always be a consecutive list. Therefore, `remove_node()` must not leave a hole when removing an item from the list.