Charge transfer and electrical double layer of an amphiphilic protic ionic liquid in bulk and when confined in nanopores