SSP-2162 Add sap_status_code student search support

Note that this *completely* replaces the previous support for
the boolean 'sap_status' from top to bottom, including a
non-backward-compatible API change.