High-Speed and High-Resolution Photon Counting for Near-Range Lidar