Extract inline list growth logic into `ensureListCapacity` helper and add `validateIndex` function supporting negative indices. Implement `list_clear` primitive that resets count to zero without freeing memory, and `list_insert` primitive that shifts elements right and inserts at validated position. Add comprehensive test suites for both operations covering empty lists, normal/negative indices, and return values.
- Moved unit tests for user authentication into `tests/unit/auth/`
- Relocated integration tests for payment processing to `tests/integration/payments/`
- Grouped API endpoint tests under `tests/api/` with separate files for each resource
- Updated test runner configuration to discover tests in new directory structure