Solid-state synthesis of Ag-doped PANI nanocomposites for their end-use as an electrochemical sensor for hydrogen peroxide and dopamine