Generalized uncertainty principle and corpuscular gravity