[FUNCTION] implement get_pool_remaining_time
- Title: Calculate time remaining for a pool.
- Description: Return the seconds left until the pool deadline in a safe way.
- Requirements:
- Handle cases where the deadline has already passed (return 0).
- Test: Mock ledger timestamp to verify calculation.