Grant Shapps announces investigation into attack by ‘malign actor’ that targeted up to 270,000 military personnel records