A retractable barrier designed to protect Venice from sea level rise and storm surges is set to be operational next year. But the project’s engineering limitations and cost overruns are raising questions about the mega-projects that many coastal cities are hoping can save them.