Cardiff have completed the signing of goalkeeper Simon Moore from Brentford on a four-year deal for an undisclosed fee.