The heartbeat_need_update member can be accessed by both OSD tick thread and
PG relevant threads, that is why the heartbeat_update_lock mutex is introduced
to protect against its change. However, in the tick thread we may still be able
to reset heartbeat_need_update to false whithout holding heartbeat_update_lock
in hand, which shall be considered as a race conditon.
This pr solves the above problem by add a new API to clear heartbeat_need_update
atomically, which fix the above potential race condition.