Boundary energy and boundary states in integrable quantum field theories