Efficient solution techniques for linear and non-linear rational expectations models