Lightweight Edge Intelligence Empowered Near-Crash Detection Towards Real-Time Vehicle Event Logging