Fix velocity and force evaluation for empty selections.

Requesting velocity or force evaluation and then passing an empty
selection resulted in an assert (in multiple places in the code).
Added a test for the behavior in this case.

Change-Id: I70cfb43c652f709fd555b4f23467f71fdb4bd3e7