Added profiling support.
Bug fix: Cursor->close() didn't reset its data if the cursor was already complete.
Improved cursor test and new profiling test.
Reverts accidentally changed port in run.php