Hydrogen injection and retention in nanocavities of single-crystalline silicon