BAE Systems has successfully demonstrated a groundbreaking new type of autonomous submarine, developed specifically for military use.