BP replaces CEO Hayward, reports $17 billion loss