A royal commission will begin looking at potential failures of security agencies to stop the December 14 mass shooting.