Plans to build the UK's longest ski slope in the Welsh Valleys have been approved by councillors.