Taiwan has unveiled its first domestically-made submarine as it bolsters its defences against a possible Chinese attack.