A “self-radicalised lone wolf terrorist” who plotted to bomb an RAF base in North Yorkshire as well as a hospital has been jailed for life.