Generalized uncertainty principle in three-dimensional gravityand the BTZ black hole