kernel: implementa select_document(), equivalente à select() em documents.

Signed-off-by: Francisco Prates <mad.kanie@gmail.com>