scd: Take the lock earlier in the function dispatchers.
* scd/app.c: Chnage all function dispatcher.
This change will allow us to easier integrate an app swithcing logic.
The change should have no user visible effect. The error checking we
do now with the card locked will rarely be asserted. It is the
correct thing to do anyway.
- Signed-off-by: Werner Koch <firstname.lastname@example.org>