A 200-tonne hinged flap bolted to the Orkney seabed generated electricity from waves for six years. The technology worked. Then the money ran out.