For the one with the full stock, the battery you linked to is great. The 4000 mAh cells will work great. From what I read somewhere (someone correct me if I'm wrong), the 5000 mAh ones aren't as good for airsoft because of a lower discharge rate or something. 4000 mAh is fine.
For a small battery, a nunchuch style battery will fit the handguard. I've never had anything but that in my old M4, so I can't say for sure what will or won't fit in there.