Tobey Maguire and Jennifer Meyer reach an agreement to end their marriage nearly five years after her divorce filing, with court approval still pending