A resonant-term-based model including a nascent disk, precession, and oblateness: application to GJ 876