Ab-initio study of electronic and phononic properties of bulk TiC and its narrow nanowires by density functional theory