How does memory safety work in Rust without a garbage collector, and explain ownership, borrowing, and lifetimes.