Flapping states of an elastically anchored plate in a uniform flow with applications to energy harvesting by fluid-structure interaction