Strain-Induced Boundary States and Phase Transitions in Graphene Flakes