We currently have several CommandObjects that manually reimplement the checking for a selected target
or a target in the execution context (which is the selected target when they are invoked). This patch removes
all these checks and replaces them by setting the eCommandRequiresTarget flag that Pavel suggested. With
this flag we are doing the same check but without having to duplicate this code in all these CommandObjects.
I also added a GetSelectedTarget() variant of the GetSelectedOrDummyTarget() function to the
CommandObject that checks that the flag is set and then returns a reference to the target. I didn't rewrite
all the target variables from Target * to Target & in this patch as last time this change caused a lot of merge
conflicts in Swift and I would prefer having that in a separate NFC commit.