Structure, elastic properties and strength of amorphous and nanocomposite carbon