drm: Implement wait_for_idle cmd and add a small fix
This MR includes following two changes:
1. Implement wait_for_idle cmd.
2. Free data of hash table ctx->id_to_ctx to avoid memory leak.
v2->v1:
Drop the patch of implementing wait_for_idle cmd and only leave the one that fix memory leak.
Edited by Julia Zhang