Neighbor Discovery in Wireless Networks: A Multiuser-Detection Approach