scheduler: Make addTask and removeTask noops on empty NodeInfo structs
scheduler: Make addTask and removeTask noops on empty NodeInfo structs

The nodeInfo function returns an empty nodeInfo struct when the node
does not exist in the heap. Rather than check this every time, the
scheduler just plows ahead anyway and relies on nothing actually
happening if it's working with an empty nodeInfo. This keeps the logic a
lot simpler. But addTask/removeTask need to return early if they are
dealing with an empty nodeInfo; otherwise they might try to access a nil
map.

Also, clean up the functions to remove a few levels of indentation.

Signed-off-by: Aaron Lehmann <b9d749ea9a65ae80fa8907e2f6e53a17ebff821c@vitelus.com>

jlhawn/swarmkit,docker/swarmkit,diogomonica/swarmkit,Noyan759/swarmkit,sungwonh/swarmkit,RenaudWasTaken/swarmkit,allencloud/swarmkit,deljuven/swarmkit,RenaudWasTaken/swarmkit,AliyunContainerService/swarmkit,yongtang/swarmkit,dperny/swarmkit-1,aaronlehmann/swarmkit,elifa/swarmkit,fate-grand-order/swarmkit,cezarsa/swarmkit,vasil-yordanov/swarmkit,runshenzhu/swarmkit,diogomonica/swarmkit,yongtang/swarmkit,cheyang/swarmkit,allencloud/swarmkit,jlhawn/swarmkit,vasil-yordanov/swarmkit,aaronlehmann/swarmkit,Noyan759/swarmkit,yp-engineering/swarmkit,cezarsa/swarmkit,alyyousuf7/swarmkit,dperny/swarmkit-1,fate-grand-order/swarmkit,sungwonh/swarmkit,alyyousuf7/swarmkit,elifa/swarmkit,cheyang/swarmkit,deljuven/swarmkit,AliyunContainerService/swarmkit,docker/swarmkit,runshenzhu/swarmkit,yp-engineering/swarmkit