On integral graphs with few cycles