MIMO Multifunction RF Systems: Detection Performance and Waveform Design