SAPPHIRE: A toolkit for building efficient stream programs for medical video analysis