Former Barcelona and Arsenal midfielder Cesc Fabregas has announced his retirement from professional football aged 36.