Boundary observers for linear and quasi-linear and quasi-linear hyperbolic systems with application to flow control