Brazil's federal police have formally accused ex-president Jair Bolsonaro of a role in an alleged coup attempt after he lost the 2022 presidential elections.