sptests/spedfsched04: Merge and fix
Merge into one file and fix obvious problems (e.g. out of bounds array access).
Update #2795.