Flexible waveguide-integrated photodetectors